You are here

function PageNumber::render in Views PDF 8

This method adds a page number to the display, if it is a PDF display.

Therefore the PDF class is used.

File

src/Plugin/views/style/PageNumber.php, line 31
Contains \Drupal\views_pdf\Plugin\views\style\PageNumber.

Class

PageNumber
Class that holds the functionality for the page number in a PDF display.

Code

function render($values) {
  if (isset($this->view->pdf) && is_object($this->view->pdf)) {
    return $this->view->pdf
      ->getPage();
  }
  else {
    return '';
  }
}