solrlog-1.0.1/src/Plugin/views/wizard/LogEntry.php
src/Plugin/views/wizard/LogEntry.php
<?php
namespace Drupal\solrlog\Plugin\views\wizard;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\views\Attribute\ViewsWizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;
/**
* Tests creating node views with the wizard.
*/
#[ViewsWizard(
id: 'solrlog',
title: new TranslatableMarkup('Solr log entry'),
base_table: 'solrlog',
)]
class LogEntry 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;
}
}
