You are here

public function ConvertToPdf::__construct in PDF using mPDF 8

Same name and namespace in other branches
  1. 8.2 src/Conversion/ConvertToPdf.php \Drupal\pdf_using_mpdf\Conversion\ConvertToPdf::__construct()

ConvertToPdf constructor.

Parameters

\Drupal\Core\Render\RendererInterface $renderer: The render interface.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory.

\Drupal\Core\Utility\Token $token: Token service.

File

src/Conversion/ConvertToPdf.php, line 78

Class

ConvertToPdf
Class ConvertToPdf.

Namespace

Drupal\pdf_using_mpdf\Conversion

Code

public function __construct(RendererInterface $renderer, ConfigFactoryInterface $config_factory, Token $token) {
  $this->renderer = $renderer;
  $this->configFactory = $config_factory;
  $this->token = $token;
  $node = \Drupal::routeMatch()
    ->getParameter('node');
  if ($node instanceof NodeInterface) {
    $this->node = $node;
  }
}