You are here

public function NextPreviousBlock::__construct in Next Previous Post Block (Node or Page Pagination) 8

Same name and namespace in other branches
  1. 8.5 src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::__construct()
  2. 9.0.x src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::__construct()
  3. 1.0.x src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::__construct()

Creates a NextPreviousBlock instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\Core\Entity\Query\QueryFactory $queryFactory: The Query Factory.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/NextPreviousBlock.php, line 66

Class

NextPreviousBlock
Provides a 'Next Previous' block.

Namespace

Drupal\nextpre\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, EntityTypeManagerInterface $entityTypeManager, QueryFactory $queryFactory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->routeMatch = $route_match;
  $this->entityTypeManager = $entityTypeManager;
  $this->queryFactory = $queryFactory;
}