You are here

private function OAIPMH::getMetadataPrefixByToken in Views OAI-PMH 8

1 call to OAIPMH::getMetadataPrefixByToken()
OAIPMH::initDisplay in src/Plugin/views/display/OAIPMH.php
Initializes the display plugin.

File

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

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

private function getMetadataPrefixByToken() {
  $token = $this->view
    ->getRequest()->query
    ->get('resumptionToken', NULL);
  if ($token) {

    /** @var Repository $repository */
    $repository = \Drupal::service('views_oai_pmh.repository');
    $paginator = $repository
      ->decodeResumptionToken($token);
    return $paginator['metadataPrefix'];
  }
  return NULL;
}