Automattic\WooCommerce\Internal\Admin\Logging
PageController::get_list_table
Get and cache an instance of the list table.
Метод класса: PageController{}
Хуков нет.
Возвращает
FileListTable|SearchListTable.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_list_table( $view );
- $view(строка) (обязательный)
- The current view, which determines which list table class to get.
Код PageController::get_list_table() PageController::get list table WC 10.3.4
private function get_list_table( string $view ) {
if ( $this->list_table instanceof WP_List_Table ) {
return $this->list_table;
}
switch ( $view ) {
case 'list_files':
$this->list_table = new FileListTable( $this->file_controller, $this );
break;
case 'search_results':
$this->list_table = new SearchListTable( $this->file_controller, $this );
break;
}
return $this->list_table;
}