PHP 클래스 WPDKListTableViewController

## Overview The WPDKListTableViewController class extends the WordPress WP_List_Table class. It add some useful methods to semplify the common procedure. This class is not a true view controller (WPDKViewController) but it is very similar.
상속: extends WP_List_Table
파일 보기 프로젝트 열기: wpxtreme/wpdk

공개 프로퍼티들

프로퍼티 타입 설명
$column_headers array Column header
$getStatusID string Name of GET parameter for status. Default status
$id string A string id for this list table view. This id is used in class HTML markup.
$model WPDKListTableModel An instance of WPDKListTableModel class
$title string The top head view controller title
$viewController WPDKViewController The internal view controller for this list table

보호된 프로퍼티들

프로퍼티 타입 설명
$args array Internal copy of WP_List_Table args

공개 메소드들

메소드 설명
__construct ( string $id, string $title, array $args ) : WPDKListTableViewController The child class should call this constructor from it's own constructor.
_admin_head ( )
action ( ) : boolean | string Return the current action or FALSE if no action defined.
action_result ( ) : boolean | WP_Error Return the action result.
actions ( array $args, string $status ) : mixed Utility for build a right actions list when the list table is showing items.
actions_column ( array $item, string $content, string $item_status = '', string $description = '' ) : string Return the HTML markup in order to display the content of column with row actions.
admin_head ( )
admin_print_styles ( ) Fires when styles are printed for a specific admin page based on $hook_suffix.
after_display ( ) This delegate method is called after display the table, inner the form.
before_display ( ) This delegate method is called before display the table, inner the form
before_views ( ) This delegate method is called before display views
column_cb ( array $item ) : string Return the HTML markup for the checkbox element used for multiple selections.
column_checkbox ( array $item ) : boolean Return TRUE to display the checkbox, FALSE otherwise
column_default ( array $item, string $column_name ) : mixed Display a cel content for a column.
current_action ( ) : string | boolean Get the current action selected from the bulk actions dropdown.
data ( ) : array Return the items data list. This method will be over-ridden in a sub-class.
didHeadLoad ( )
display ( ) This method override the default WP_List_Table display.
get_actions_with_status ( mixed $item, string $status ) : array Return tha array with the action for the current status
get_bulk_actions ( ) : array Return an array with the list of bulk actions used in combo menu select.
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_count_statuses ( ) : array Return the array with status key => count.
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
get_views ( ) : array Return an array with the HTML markup list of statuses. This method use the $statuses property format as:
html ( ) : string Return the HTML markup for list table view.
load ( )
no_items ( ) The itens can be not found for two main reason: the query search has param tha t doesn't match with items, or the items list (or the database query) return an empty list.
prepare_items ( ) : boolean Processing data items to view.
process_bulk_action ( ) : boolean Return TRUE to stop the display of list item table, FALSE otherwise. Default return FALSE if you do not override.
search_box_field ( ) Display a search box field
statuses ( $statuses ) To override
willLoad ( )
wpdk_header_view_inner_title ( WPDKHeaderView $header_view ) Fires into the the title TAG.
wpdk_list_table_remove_query_args_redirect ( array $args = [] ) Filter the query args for redirect after an actions.

비공개 메소드들

메소드 설명
current_status ( string $default = '' ) : string Return the default status.

메소드 상세

__construct() 공개 메소드

Create an instance of WPDKListTableViewController class
public __construct ( string $id, string $title, array $args ) : WPDKListTableViewController
$id string List table id
$title string Title of view controller
$args array Standard WP_List_Table args
리턴 WPDKListTableViewController

_admin_head() 공개 메소드

부터: 1.4.21
public _admin_head ( )

action() 공개 메소드

Return the current action or FALSE if no action defined.
public action ( ) : boolean | string
리턴 boolean | string

action_result() 공개 메소드

Return the action result.
public action_result ( ) : boolean | WP_Error
리턴 boolean | WP_Error

actions() 공개 정적인 메소드

Utility for build a right actions list when the list table is showing items.
사용 중단: Use the new engine subclass - used by SamrtShop
public static actions ( array $args, string $status ) : mixed
$args array
$status string
리턴 mixed

actions_column() 공개 메소드

This actions are usualy: Edit | Delete | Set Trash | etc...
public actions_column ( array $item, string $content, string $item_status = '', string $description = '' ) : string
$item array The single item
$content string The content to display and link.
$item_status string Optional. Overwrite the view status for item in a specific status.
$description string Optional. Additional description not linked.
리턴 string

admin_head() 공개 메소드

부터: 1.4.18
public admin_head ( )

admin_print_styles() 공개 메소드

Fires when styles are printed for a specific admin page based on $hook_suffix.
부터: 1.6.0
public admin_print_styles ( )

after_display() 공개 메소드

This delegate method is called after display the table, inner the form.
부터: 1.5.1
public after_display ( )

before_display() 공개 메소드

This delegate method is called before display the table, inner the form
부터: 1.5.1
public before_display ( )

before_views() 공개 메소드

This delegate method is called before display views
부터: 1.5.1
public before_views ( )

column_cb() 공개 메소드

Return the HTML markup for the checkbox element used for multiple selections.
public column_cb ( array $item ) : string
$item array The single item from items
리턴 string

column_checkbox() 공개 메소드

Return TRUE to display the checkbox, FALSE otherwise
부터: 1.5.5
public column_checkbox ( array $item ) : boolean
$item array The single item from items
리턴 boolean

column_default() 공개 메소드

Display a cel content for a column.
public column_default ( array $item, string $column_name ) : mixed
$item array The single item
$column_name string Column name
리턴 mixed

current_action() 공개 메소드

Return the action name or FALSE if no action was selected.
사용 중단: - not used
부터: 1.5.1
public current_action ( ) : string | boolean
리턴 string | boolean

data() 공개 메소드

Return the items data list. This method will be over-ridden in a sub-class.
public data ( ) : array
리턴 array

didHeadLoad() 공개 정적인 메소드

public static didHeadLoad ( )

display() 공개 메소드

This method override the default WP_List_Table display.
public display ( )

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() 공개 메소드

Return an array with the list of bulk actions used in combo menu select.
public get_bulk_actions ( ) : array
리턴 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_count_statuses() 공개 메소드

Return the array with status key => count.
부터: 1.5.16
public get_count_statuses ( ) : array
리턴 array

get_sortable_columns() 공개 메소드

Return the sortable columns
public get_sortable_columns ( ) : array
리턴 array

get_status() 공개 메소드

Return the count of specific status
사용 중단: since 1.5.16 - Use `get_count_statuses()` instead
public get_status ( string $status ) : integer
$status string
리턴 integer

get_statuses() 공개 메소드

Return a key value pairs array with statuses supported
public get_statuses ( ) : array
리턴 array

get_views() 공개 메소드

$statuses = array( 'all' => array( 'label' => __( 'All' ), 'count' => 0 ), 'publish' => array( 'label' => __( 'Publish' ), 'count' => 0 ) );
public get_views ( ) : array
리턴 array

html() 공개 메소드

Return the HTML markup for list table view.
public html ( ) : string
리턴 string

load() 공개 메소드

부터: 1.4.18
public load ( )

no_items() 공개 메소드

The itens can be not found for two main reason: the query search has param tha t doesn't match with items, or the items list (or the database query) return an empty list.
public no_items ( )

prepare_items() 공개 메소드

You can override this method to customize your retrived data.
public prepare_items ( ) : boolean
리턴 boolean

process_bulk_action() 공개 메소드

You can override this method to process the action request sent from list table. You can processing bulk and single action. This method must return a boolean in order to re-processed the items list view.
public process_bulk_action ( ) : boolean
리턴 boolean

search_box_field() 공개 메소드

Display a search box field
부터: 1.5.1
public search_box_field ( )

statuses() 공개 메소드

To override
public statuses ( $statuses )
$statuses

willLoad() 공개 정적인 메소드

public static willLoad ( )

wpdk_header_view_inner_title() 공개 메소드

Fires into the the title TAG.
public wpdk_header_view_inner_title ( WPDKHeaderView $header_view )
$header_view WPDKHeaderView An instance of WPDKHeaderView class.

wpdk_list_table_remove_query_args_redirect() 공개 메소드

Filter the query args for redirect after an actions.
부터: 1.5.17
public wpdk_list_table_remove_query_args_redirect ( array $args = [] )
$args array Optional. Default query args to remove. Default `array()`

프로퍼티 상세

$args 보호되어 있는 프로퍼티

Internal copy of WP_List_Table args
protected array $args
리턴 array

$column_headers 공개적으로 프로퍼티

Column header
public array $column_headers
리턴 array

$getStatusID 공개적으로 프로퍼티

Name of GET parameter for status. Default status
사용 중단: sice 1.5.16 - Use `wpdk_` args instead
public string $getStatusID
리턴 string

$id 공개적으로 프로퍼티

A string id for this list table view. This id is used in class HTML markup.
public string $id
리턴 string

$model 공개적으로 프로퍼티

An instance of WPDKListTableModel class
부터: 1.3.0
public WPDKListTableModel $model
리턴 WPDKListTableModel

$title 공개적으로 프로퍼티

The top head view controller title
public string $title
리턴 string

$viewController 공개적으로 프로퍼티

The internal view controller for this list table
public WPDKViewController $viewController
리턴 WPDKViewController