Watchdog.php

Same filename and directory in other branches
  1. 9 core/modules/dblog/src/Plugin/views/wizard/Watchdog.php
  2. 8.9.x core/modules/dblog/src/Plugin/views/wizard/Watchdog.php
  3. 10 core/modules/dblog/src/Plugin/views/wizard/Watchdog.php

Namespace

Drupal\dblog\Plugin\views\wizard

File

core/modules/dblog/src/Plugin/views/wizard/Watchdog.php

View source
<?php

namespace Drupal\dblog\Plugin\views\wizard;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\views\Attribute\ViewsWizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;

/**
 * Defines a wizard for the watchdog table.
 */
class Watchdog extends WizardPluginBase {
    
    /**
     * Set the created column.
     *
     * @var string
     */
    protected $createdColumn = 'timestamp';
    
    /**
     * {@inheritdoc}
     */
    protected function defaultDisplayOptions() {
        $display_options = parent::defaultDisplayOptions();
        // Add permission-based access control.
        $display_options['access']['type'] = 'perm';
        $display_options['access']['options']['perm'] = 'access site reports';
        return $display_options;
    }

}

Classes

Title Deprecated Summary
Watchdog Defines a wizard for the watchdog table.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.