Automattic\WooCommerce\Internal\Admin\Logging

PageController::get_list_table()privateWC 1.0

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() WC 9.5.1

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;
}