You are here

public function PrintableLinksBlock::__construct in Printer and PDF versions for Drupal 8+ 8

Same name in this branch
  1. 8 src/Plugin/Derivative/PrintableLinksBlock.php \Drupal\printable\Plugin\Derivative\PrintableLinksBlock::__construct()
  2. 8 src/Plugin/Block/PrintableLinksBlock.php \Drupal\printable\Plugin\Block\PrintableLinksBlock::__construct()
Same name and namespace in other branches
  1. 2.x src/Plugin/Block/PrintableLinksBlock.php \Drupal\printable\Plugin\Block\PrintableLinksBlock::__construct()

Parameters

array $configuration: The configuration array.

string $plugin_id: The plugin ID.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Routing\RouteMatchInterface $routematch: The route match interface.

\Drupal\printable\PrintableLinkBuilderInterface $link_builder: The printable link builder.

\Drupal\Core\Datetime\DateFormatter $dateFormatter: Provides a service to handle various date related functionality.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/PrintableLinksBlock.php, line 63

Class

PrintableLinksBlock
Provides a printable links block for each printable entity.

Namespace

Drupal\printable\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $routematch, PrintableLinkBuilderInterface $link_builder, DateFormatter $dateFormatter) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->routematch = $routematch;
  $this->linkBuilder = $link_builder;
  $this->dateFormatter = $dateFormatter;
}