You are here

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

1 call to OAIPMH::pageByResumptionToken()
OAIPMH::execute in src/Plugin/views/display/OAIPMH.php
Executes the view and returns data in the format required.

File

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

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 pageByResumptionToken() {
  $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['offset'];
  }
  return 0;
}