Version 1
[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   protected $createdColumn = 'timestamp';
23
24   /**
25    * {@inheritdoc}
26    */
27   protected function defaultDisplayOptions() {
28     $display_options = parent::defaultDisplayOptions();
29
30     // Add permission-based access control.
31     $display_options['access']['type'] = 'perm';
32     $display_options['access']['options']['perm'] = 'access site reports';
33
34     return $display_options;
35   }
36
37 }