Class WPDA_Publisher_Model

Model for plugin table 'menus'

author Peter Schulz
since 2.6.0
package WPDataAccess\Plugin_Table_Models
inherited_from \WPDataAccess\Plugin_Table_Models\WPDA_Plugin_Table_Base_Model

 Methods

Check if const BASE_TABLE_NAME is defined (cannot proceed without)

check_base_table_name() 
InheritedStatic

Return number of records in base table

count() : integer
InheritedStatic

Returns

integer

Delete a record fro the base table

delete(integer $menu_id) : mixed
Static

Parameters

$menu_id

integer

Menu id

Returns

mixedTransaction status

Get base table name

get_base_table_name() : string
InheritedStatic

Returns

stringBase table name

Get menus defined for a specific table

get_table_menus(string $menu_table_name, string $menu_schema_name) : array
Static

Parameters

$menu_table_name

string

Table name

$menu_schema_name

string

Schema name

Returns

arrayList of menus for the requested table name

Insert a record in the base table

insert(string $menu_table_name, string $menu_name, string $menu_slug, string $menu_role, string $menu_schema_name) : boolean
Static

Parameters

$menu_table_name

string

Table name

$menu_name

string

Menu name

$menu_slug

string

Menu slug

$menu_role

string

Menu role(s)

$menu_schema_name

string

Schema name

Returns

booleanTRUE = Insert was successful

List of external menu items

list_external_menus() : array
Static

Used in \WP_Data_Access_Admin::add_menu_my_tables() to build user defined menus.

Returns all external menu items. These menus are below a user defined menu.

since 1.0.0

Returns

arrayList of menu items

Check if base table exists

table_exists() : boolean
InheritedStatic

Returns

booleanTRUE = table found

Update a record in the base table

update(integer $menu_id, string $menu_table_name, string $menu_name, string $menu_slug, string $menu_role, string $menu_schema_name) : mixed
Static

Parameters

$menu_id

integer

Menu id

$menu_table_name

string

Table name

$menu_name

string

Menu name

$menu_slug

string

Menu slug

$menu_role

string

Menu role(s)

$menu_schema_name

string

Schema name

Returns

mixedTransaction status

 Constants

 

Base table name (without prefixes): MUST BE DEFINED IN SUBCLASS!!!

BASE_TABLE_NAME = 'wpda_menus' 
inherited_from \WPDataAccess\Plugin_Table_Models\WPDA_Plugin_Table_Base_Model::BASE_TABLE_NAME
 

Base table name (without prefixes): MUST BE DEFINED IN SUBCLASS!!!

BASE_TABLE_NAME = null