You are here

protected function Watchdog::defaultDisplayOptions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/dblog/src/Plugin/views/wizard/Watchdog.php \Drupal\dblog\Plugin\views\wizard\Watchdog::defaultDisplayOptions()

Assembles the default display options for the view.

Most wizards will need to override this method to provide some fields or a different row plugin.

Return value

array Returns an array of display options.

Overrides WizardPluginBase::defaultDisplayOptions

File

core/modules/dblog/src/Plugin/views/wizard/Watchdog.php, line 29

Class

Watchdog
Defines a wizard for the watchdog table.

Namespace

Drupal\dblog\Plugin\views\wizard

Code

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;
}