Tweaks to page rendering methods
This commit is contained in:
parent
591c728ac3
commit
21a995bb50
|
@ -94,8 +94,8 @@ class PageController {
|
||||||
|
|
||||||
switch ( $handler ) {
|
switch ( $handler ) {
|
||||||
case LogHandlerFileV2::class:
|
case LogHandlerFileV2::class:
|
||||||
$args = $this->get_query_params();
|
$params = $this->get_query_params();
|
||||||
$this->render_filev2( $args );
|
$this->render_filev2( $params );
|
||||||
break;
|
break;
|
||||||
case 'WC_Log_Handler_DB':
|
case 'WC_Log_Handler_DB':
|
||||||
WC_Admin_Status::status_logs_db();
|
WC_Admin_Status::status_logs_db();
|
||||||
|
@ -109,17 +109,17 @@ class PageController {
|
||||||
/**
|
/**
|
||||||
* Render the views for the FileV2 log handler.
|
* Render the views for the FileV2 log handler.
|
||||||
*
|
*
|
||||||
* @param array $args Args for rendering the views.
|
* @param array $params Args for rendering the views.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function render_filev2( array $args = array() ): void {
|
private function render_filev2( array $params = array() ): void {
|
||||||
$view = $args['view'] ?? '';
|
$view = $params['view'] ?? '';
|
||||||
|
|
||||||
switch ( $view ) {
|
switch ( $view ) {
|
||||||
case 'list_files':
|
case 'list_files':
|
||||||
default:
|
default:
|
||||||
$this->render_file_list_page();
|
$this->render_file_list_page( $params );
|
||||||
break;
|
break;
|
||||||
case 'single_file':
|
case 'single_file':
|
||||||
WC_Admin_Status::status_logs_file();
|
WC_Admin_Status::status_logs_file();
|
||||||
|
@ -130,11 +130,12 @@ class PageController {
|
||||||
/**
|
/**
|
||||||
* Render the file list view.
|
* Render the file list view.
|
||||||
*
|
*
|
||||||
|
* @param array $params Args for rendering the views.
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function render_file_list_page(): void {
|
private function render_file_list_page( array $params = array() ): void {
|
||||||
$defaults = $this->get_query_param_defaults();
|
$defaults = $this->get_query_param_defaults();
|
||||||
$params = $this->get_query_params();
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h2>
|
<h2>
|
||||||
|
|
Loading…
Reference in New Issue