Automattic\WooCommerce\Internal\Admin\Logging

PageController::get_list_tableprivateWC 1.0

Get and cache an instance of the list table.

Method of the class: PageController{}

No Hooks.

Returns

FileListTable|SearchListTable.

Usage

// private - for code of main (parent) class only
$result = $this->get_list_table( $view );
$view(string) (required)
The current view, which determines which list table class to get.

PageController::get_list_table() code WC 10.9.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;
}