PHP Класс Pressbooks\Admin\Catalog_List_Table

См. также: http://codex.wordpress.org/Class_Reference/WP_List_Table
Наследование: extends WP_List_Table
Показать файл Открыть проект

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

Метод Описание
__construct ( ) Constructor, must call parent
_js_vars ( )
addMenu ( ) WP Hook, Instantiate UI
addSearchParamsToUrl ( string $url ) : string Rebuild a URL with known search parameters
ajax_response ( )
column_cb ( array $item ) : string REQUIRED if displaying checkboxes or using bulk actions! The 'cb' column is given special treatment when columns are processed. It ALWAYS needs to have it's own method.
column_cover ( array $item ) : string
column_default ( object $item, string $column_name ) : string This method is called when the parent class can't find a method for a given column. For example, if the class needs to process a column named 'title', it would first see if a method named $this->column_title() exists. If it doesn't this one will be used.
column_status ( array $item ) : string
column_title ( array $item ) : string
get_bulk_actions ( ) : array
get_columns ( ) : array This method dictates the table's columns and titles.
get_sortable_columns ( ) : array This method merely defines which columns should be sortable and makes them clickable - it does not handle the actual sorting.
prepare_items ( ) REQUIRED! This is where you prepare your data for display. This method will usually be used to query the database, sort and filter the data, and generally get it ready to be displayed. At a minimum, we should set $this->items and $this->set_pagination_args()
print_column_headers ( boolean $with_id = true ) Form is POST not GET. Override parent method to compensate.
viewCatalogUrl ( ) : string Generate catalog URL. Dies on problem.

Защищенные методы

Метод Описание
atLeastOneKeyword ( $keyword, array $data ) : boolean
getHiddenColumns ( ) : array TODO: This isn't well documented, not sure i'm doing it right.
getItemsData ( ) : array
renderTagColumn ( object $item, string $column_name ) : string
searchFilter ( array $data ) : array

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

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

Constructor, must call parent
public __construct ( )

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

public _js_vars ( )

addMenu() статический публичный Метод

WP Hook, Instantiate UI
static public addMenu ( )

addSearchParamsToUrl() статический публичный Метод

Rebuild a URL with known search parameters
static public addSearchParamsToUrl ( string $url ) : string
$url string
Результат string

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

public ajax_response ( )

atLeastOneKeyword() защищенный Метод

protected atLeastOneKeyword ( $keyword, array $data ) : boolean
$keyword
$data array
Результат boolean

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

REQUIRED if displaying checkboxes or using bulk actions! The 'cb' column is given special treatment when columns are processed. It ALWAYS needs to have it's own method.
public column_cb ( array $item ) : string
$item array A singular item (one full row's worth of data)
Результат string Text to be placed inside the column

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

public column_cover ( array $item ) : string
$item array A singular item (one full row's worth of data)
Результат string Text to be placed inside the column

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

This method is called when the parent class can't find a method for a given column. For example, if the class needs to process a column named 'title', it would first see if a method named $this->column_title() exists. If it doesn't this one will be used.
См. также: WP_List_Table::single_row_columns()
public column_default ( object $item, string $column_name ) : string
$item object A singular item (one full row's worth of data)
$column_name string The name/slug of the column to be processed
Результат string Text or HTML to be placed inside the column

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

public column_status ( array $item ) : string
$item array A singular item (one full row's worth of data)
Результат string Text to be placed inside the column

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

public column_title ( array $item ) : string
$item array A singular item (one full row's worth of data)
Результат string Text to be placed inside the column

getHiddenColumns() защищенный Метод

..
protected getHiddenColumns ( ) : array
Результат array

getItemsData() защищенный Метод

protected getItemsData ( ) : array
Результат array

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

public get_bulk_actions ( ) : array
Результат array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'

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

This method dictates the table's columns and titles.
public get_columns ( ) : array
Результат array An associative array containing column information: 'slugs'=>'Visible Titles'

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

This method merely defines which columns should be sortable and makes them clickable - it does not handle the actual sorting.
public get_sortable_columns ( ) : array
Результат array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)

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

REQUIRED! This is where you prepare your data for display. This method will usually be used to query the database, sort and filter the data, and generally get it ready to be displayed. At a minimum, we should set $this->items and $this->set_pagination_args()
public prepare_items ( )

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

Form is POST not GET. Override parent method to compensate.
public print_column_headers ( boolean $with_id = true )
$with_id boolean

renderTagColumn() защищенный Метод

protected renderTagColumn ( object $item, string $column_name ) : string
$item object A singular item (one full row's worth of data)
$column_name string The name/slug of the column to be processed
Результат string Text to be placed inside the column

searchFilter() защищенный Метод

protected searchFilter ( array $data ) : array
$data array
Результат array

viewCatalogUrl() статический публичный Метод

Generate catalog URL. Dies on problem.
static public viewCatalogUrl ( ) : string
Результат string