You are here

public function PrevNextBlock::__construct in Previous/Next API 8.2

Constructs an PrevNextBlock object.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

string $plugin_definition: The plugin implementation definition.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The Request Stack.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\prev_next\PrevNextHelperInterface $prevnext_helper: The PrevNextHelper service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/PrevNextBlock.php, line 64

Class

PrevNextBlock
Provides a 'Previous Next' block.

Namespace

Drupal\prev_next\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RequestStack $request_stack, ModuleHandlerInterface $module_handler, PrevNextHelperInterface $prevnext_helper) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->requestStack = $request_stack;
  $this->moduleHandler = $module_handler;
  $this->prevnextHelper = $prevnext_helper;
}