email_changelog-8.x-1.0-alpha1/src/Plugin/views/wizard/EmailChangelog.php
src/Plugin/views/wizard/EmailChangelog.php
<?php
namespace Drupal\email_changelog\Plugin\views\wizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;
/**
* Defines a wizard for the watchdog table.
*
* @ViewsWizard(
* id = "email_changelog",
* module = "email_changelog",
* base_table = "email_changelog",
* title = @Translation("Email Log entries")
* )
*/
class EmailChangelog 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'] = 'view email changelog';
return $display_options;
}
}
