PHP Class WPDKDBTableModelListTable

Deprecation: since 1.5.2 - use WPDKDBListTableModel instead
Author: =undo= ([email protected])
Inheritance: extends WPDKDBTableModel
Datei anzeigen Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$action_result boolean Used for check the action and bulk action results

Public Methods

Method Description
__construct ( string $table_name, string $sql_file = '' ) : WPDKDBTableModelListTable Create an instance of WPDKDBTableModelListTable class
action_result ( boolean | WP_Error $result ) Set the action result.
count ( ) public function count( $distinct = '', $status = '' )
current_action ( string $nonce = '' ) : string | boolean Get the current action selected from the bulk actions dropdown.
get_actions_with_status ( mixed $item, string $status ) : array Return tha array with the action for the current status
get_bulk_actions_with_status ( string $status ) : array Return the array with the buk action for the combo menu for a status of view
get_columns ( ) : array Return a key value pairs array with the list of columns
get_icon_statuses ( ) : array Return a key value pairs array with statuses icons glyph
get_sortable_columns ( ) : array Return the sortable columns
get_status ( string $status ) : integer Return the count of specific status
get_statuses ( ) : array Return a key value pairs array with statuses supported.
insert ( ) public function insert( $prefix, $values, $format = array() )
process_bulk_action ( ) Process actions
select ( ) : array Return the items array. This is an array of key value pairs array
status ( integer $id, string $status = WPDKDBTableRowStatuses::PUBLISH ) : mixed Set one or more record wit a status
update ( ) public function update( $prefix, $values, $where, $format = array() )

Method Details

__construct() public method

Create an instance of WPDKDBTableModelListTable class
public __construct ( string $table_name, string $sql_file = '' ) : WPDKDBTableModelListTable
$table_name string The name of the database table without WordPress prefix
$sql_file string Optional. The filename of SQL file with the database table structure and init data.
return WPDKDBTableModelListTable

action_result() public method

Set the action result.
Since: 1.6.0
public action_result ( boolean | WP_Error $result )
$result boolean | WP_Error A result from an "action".

count() public method

public function count( $distinct = '', $status = '' )
public count ( )

current_action() public method

Get the current action selected from the bulk actions dropdown.
public current_action ( string $nonce = '' ) : string | boolean
$nonce string Optional. Force nonce verify
return string | boolean The action name or False if no action was selected

get_actions_with_status() public method

Return tha array with the action for the current status
public get_actions_with_status ( mixed $item, string $status ) : array
$item mixed The item
$status string Current status
return array

get_bulk_actions_with_status() public method

Return the array with the buk action for the combo menu for a status of view
public get_bulk_actions_with_status ( string $status ) : array
$status string Current status
return array

get_columns() public method

Return a key value pairs array with the list of columns
public get_columns ( ) : array
return array

get_icon_statuses() public method

Return a key value pairs array with statuses icons glyph
public get_icon_statuses ( ) : array
return array

get_sortable_columns() public method

Return the sortable columns
public get_sortable_columns ( ) : array
return array

get_status() public method

Return the count of specific status
public get_status ( string $status ) : integer
$status string
return integer

get_statuses() public method

You can override this method to return your own statuses.
public get_statuses ( ) : array
return array

insert() public method

public function insert( $prefix, $values, $format = array() )
public insert ( )

process_bulk_action() public method

Process actions
Since: 1.4.21
public process_bulk_action ( )

select() public method

Return the items array. This is an array of key value pairs array
public select ( ) : array
return array

status() public method

Set one or more record wit a status
public status ( integer $id, string $status = WPDKDBTableRowStatuses::PUBLISH ) : mixed
$id integer Record ID
$status string Optional. The status, default WPDKDBTableRowStatuses::PUBLISH
return mixed

update() public method

public function update( $prefix, $values, $where, $format = array() )
public update ( )

Property Details

$action_result public_oe property

Used for check the action and bulk action results
public bool $action_result
return boolean