PHP Класс WPDKDBTableModelListTable

Устаревший: since 1.5.2 - use WPDKDBListTableModel instead
Автор: =undo= ([email protected])
Наследование: extends WPDKDBTableModel
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$action_result boolean Used for check the action and bulk action results

Открытые методы

Метод Описание
__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() )

Описание методов

__construct() публичный Метод

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.
Результат WPDKDBTableModelListTable

action_result() публичный Метод

Set the action result.
С версии: 1.6.0
public action_result ( boolean | WP_Error $result )
$result boolean | WP_Error A result from an "action".

count() публичный Метод

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

current_action() публичный Метод

Get the current action selected from the bulk actions dropdown.
public current_action ( string $nonce = '' ) : string | boolean
$nonce string Optional. Force nonce verify
Результат string | boolean The action name or False if no action was selected

get_actions_with_status() публичный Метод

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
Результат array

get_bulk_actions_with_status() публичный Метод

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
Результат array

get_columns() публичный Метод

Return a key value pairs array with the list of columns
public get_columns ( ) : array
Результат array

get_icon_statuses() публичный Метод

Return a key value pairs array with statuses icons glyph
public get_icon_statuses ( ) : array
Результат array

get_sortable_columns() публичный Метод

Return the sortable columns
public get_sortable_columns ( ) : array
Результат array

get_status() публичный Метод

Return the count of specific status
public get_status ( string $status ) : integer
$status string
Результат integer

get_statuses() публичный Метод

You can override this method to return your own statuses.
public get_statuses ( ) : array
Результат array

insert() публичный Метод

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

process_bulk_action() публичный Метод

Process actions
С версии: 1.4.21
public process_bulk_action ( )

select() публичный Метод

Return the items array. This is an array of key value pairs array
public select ( ) : array
Результат array

status() публичный Метод

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
Результат mixed

update() публичный Метод

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

Описание свойств

$action_result публичное свойство

Used for check the action and bulk action results
public bool $action_result
Результат boolean