You are here

public function OAIPMH::initDisplay in Views OAI-PMH 8

Initializes the display plugin.

Parameters

\Drupal\views\ViewExecutable $view: The views executable.

array $display: The display that will be populated and attached to the view.

array $options: (optional) The options for the display plugin. Defaults to NULL.

Overrides DisplayPluginBase::initDisplay

File

src/Plugin/views/display/OAIPMH.php, line 194

Class

OAIPMH
Plugin annotation @ViewsDisplay( id = "views_oai_pmh_display", title = @Translation("OAI-PMH Views"), help = @Translation("Provide a feed using the OAI-PMH protocol."), uses_route = TRUE, admin = @Translation("OAI-PMH Views"), …

Namespace

Drupal\views_oai_pmh\Plugin\views\display

Code

public function initDisplay(ViewExecutable $view, array &$display, array &$options = NULL) {
  parent::initDisplay($view, $display, $options);
  if (!($prefix = $this
    ->getMetadataPrefixByToken())) {
    $prefix = 'oai_dc';
  }
  $this->metadataPrefix = $this->view
    ->getRequest()->query
    ->get('metadataPrefix', $prefix);
}