You are here

protected function PdfGeneratorBase::isValidPageSize in PDF generator API 8

Same name and namespace in other branches
  1. 2.x src/Plugin/PdfGeneratorBase.php \Drupal\pdf_api\Plugin\PdfGeneratorBase::isValidPageSize()

Checks if a given page size is valid.

Parameters

string $page_size: The page size to check.

Return value

bool TRUE if the page size is valid, FALSE if not.

6 calls to PdfGeneratorBase::isValidPageSize()
DompdfGenerator::setPageSize in src/Plugin/PdfGenerator/DompdfGenerator.php
Set the page size of the generated PDF pages.
MpdfGenerator::preGenerate in src/Plugin/PdfGenerator/MpdfGenerator.php
Set the global options from the plugin into the mPDF generator class.
MpdfGenerator::setPageSize in src/Plugin/PdfGenerator/MpdfGenerator.php
Set the page size of the generated PDF pages.
PdfGeneratorBase::getPageDimensions in src/Plugin/PdfGeneratorBase.php
Get the dimensions of a given page size.
TcpdfGenerator::setPageSize in src/Plugin/PdfGenerator/TcpdfGenerator.php
Set the page size of the generated PDF pages.

... See full list

File

src/Plugin/PdfGeneratorBase.php, line 75
Contains \Drupal\printable\Plugin\PrintableFormatBase.

Class

PdfGeneratorBase
Provides a base class for PDF generator plugins.

Namespace

Drupal\pdf_api\Plugin

Code

protected function isValidPageSize($page_size) {
  return array_key_exists($page_size, $this
    ->pageSizes());
}