Automattic\WooCommerce\Internal\Admin\Logging

PageController::render_list_files_view()privateWC 1.0

Render the file list view.

Method of the class: PageController{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->render_list_files_view(): void;

PageController::render_list_files_view() code WC 9.3.3

<?php
private function render_list_files_view(): void {
	$params     = $this->get_query_params( array( 'order', 'orderby', 'source', 'view' ) );
	$defaults   = $this->get_query_param_defaults();
	$list_table = $this->get_list_table( $params['view'] );

	$list_table->prepare_items();

	?>
	<header id="logs-header" class="wc-logs-header">
		<h2>
			<?php esc_html_e( 'Browse log files', 'woocommerce' ); ?>
		</h2>
		<?php $this->render_search_field(); ?>
	</header>
	<form id="logs-list-table-form" method="get">
		<input type="hidden" name="page" value="wc-status" />
		<input type="hidden" name="tab" value="logs" />
		<?php foreach ( $params as $key => $value ) : ?>
			<?php if ( $value !== $defaults[ $key ] ) : ?>
				<input
					type="hidden"
					name="<?php echo esc_attr( $key ); ?>"
					value="<?php echo esc_attr( $value ); ?>"
				/>
			<?php endif; ?>
		<?php endforeach; ?>
		<?php $list_table->display(); ?>
	</form>
	<?php
}