Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / dblog / src / Plugin / views / wizard / Watchdog.php
1 <?php
2
3 namespace Drupal\dblog\Plugin\views\wizard;
4
5 use Drupal\views\Plugin\views\wizard\WizardPluginBase;
6
7 /**
8  * Defines a wizard for the watchdog table.
9  *
10  * @ViewsWizard(
11  *   id = "watchdog",
12  *   module = "dblog",
13  *   base_table = "watchdog",
14  *   title = @Translation("Log entries")
15  * )
16  */
17 class Watchdog extends WizardPluginBase {
18
19   /**
20    * Set the created column.
21    *
22    * @var string
23    */
24   protected $createdColumn = 'timestamp';
25
26   /**
27    * {@inheritdoc}
28    */
29   protected function defaultDisplayOptions() {
30     $display_options = parent::defaultDisplayOptions();
31
32     // Add permission-based access control.
33     $display_options['access']['type'] = 'perm';
34     $display_options['access']['options']['perm'] = 'access site reports';
35
36     return $display_options;
37   }
38
39 }