diff -u b/core/modules/dblog/config/optional/views.view.watchdog.yml b/core/modules/dblog/config/optional/views.view.watchdog.yml --- b/core/modules/dblog/config/optional/views.view.watchdog.yml +++ b/core/modules/dblog/config/optional/views.view.watchdog.yml @@ -60,8 +60,8 @@ offset: false offset_label: Offset tags: - previous: ‹‹ - next: ›› + previous: ‹‹ + next: ›› style: type: table options: @@ -712 +712 @@ - tags: { } \ No newline at end of file + tags: { } diff -u b/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module --- b/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -102,7 +102,7 @@ '#type' => 'select', '#title' => t('Database log messages to keep'), '#default_value' => \Drupal::configFactory()->getEditable('dblog.settings')->get('row_limit'), - '#options' => [0 => t('All')] array_combine($row_limits, $row_limits), + '#options' => [0 => t('All')] + array_combine($row_limits, $row_limits), '#description' => t('The maximum number of messages to keep in the database log. Requires a cron maintenance task.', [':cron' => \Drupal::url('system.status')]) ]; @@ -119,15 +119,6 @@ } /** - * Implements hook_views_pre_render(). - */ -function dblog_views_pre_render(ViewExecutable $view) { - if (isset($view) && ($view->storage->get('base_table') == 'watchdog')) { - $view->element['#attached']['library'][] = 'dblog/drupal.dblog'; - } -} - -/** * Implements hook_ENTITY_TYPE_presave() for views entities. * * This hook ensures there are no views based that are using a wrong plugin for @@ -199,0 +191,9 @@ + +/** + * Implements hook_views_pre_render(). + */ +function dblog_views_pre_render(ViewExecutable $view) { + if (isset($view) && ($view->storage->get('base_table') == 'watchdog')) { + $view->element['#attached']['library'][] = 'dblog/drupal.dblog'; + } +} diff -u b/core/modules/dblog/dblog.post_update.php b/core/modules/dblog/dblog.post_update.php --- b/core/modules/dblog/dblog.post_update.php +++ b/core/modules/dblog/dblog.post_update.php @@ -44 +44 @@ - */ \ No newline at end of file + */ diff -u b/core/modules/dblog/dblog.views.inc b/core/modules/dblog/dblog.views.inc --- b/core/modules/dblog/dblog.views.inc +++ b/core/modules/dblog/dblog.views.inc @@ -1,4 +1,4 @@ - t('Log entries'), 'help' => t('Contains a list of log entries.'), ]; - $data['watchdog']['table']['join'] = array( + + $data['watchdog']['table']['join'] = [ // Link ourselves to the {users_field_data} table - 'users_field_data' => array( - 'field' => 'uid', - 'left_field' => 'uid', - ), - ); + 'users_field_data' => [ + 'field' => 'uid', + 'left_field' => 'uid', + ], + ]; $data['watchdog']['wid'] = [ 'title' => t('WID'), diff -u b/core/modules/dblog/src/Tests/DbLogViewsTest.php b/core/modules/dblog/src/Tests/DbLogViewsTest.php --- b/core/modules/dblog/src/Tests/DbLogViewsTest.php +++ b/core/modules/dblog/src/Tests/DbLogViewsTest.php @@ -19,7 +19,7 @@ * * @var array */ - public static $modules = array('dblog', 'node', 'forum', 'help', 'block', 'views'); + public static $modules = ['dblog', 'node', 'forum', 'help', 'block', 'views']; /** * {@inheritdoc} @@ -32,7 +32,7 @@ * {@inheritdoc} */ protected function filterLogsEntries($type = NULL, $severity = NULL) { - $query = array(); + $query = []; if (!is_null($type)) { $query['type[]'] = $type; } @@ -40,7 +40,7 @@ $query['severity[]'] = $severity; } - $this->drupalGet('admin/reports/dblog', array('query' => $query)); + $this->drupalGet('admin/reports/dblog', ['query' => $query]); } /** @@ -53,18 +53,18 @@ - $basic_html_format = FilterFormat::create(array( + $basic_html_format = FilterFormat::create([ 'format' => 'basic_html', 'name' => 'Basic HTML', - 'filters' => array( - 'filter_html' => array( + 'filters' => [ + 'filter_html' => [ 'status' => 1, - 'settings' => array( + 'settings' => [ 'allowed_html' => '