You are here

public function UnitIndex::__construct in Booking and Availability Management API 8

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\Entity\EntityTypeManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Session\AccountInterface $current_user: Current user.

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

\Drupal\Core\Database\Connection $connection: The database connection.

Overrides ContextAwarePluginBase::__construct

File

src/Plugin/ServiceDefinition/UnitIndex.php, line 77
Contains \Drupal\bat_api\Plugin\ServiceDefinition\UnitIndex.php

Class

UnitIndex
Plugin annotation @ServiceDefinition( id = "unit_index", methods = { "GET" }, translatable = true, deriver = "\Drupal\bat_api\Plugin\Deriver\UnitIndex" )

Namespace

Drupal\bat_api\Plugin\ServiceDefinition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_manager, AccountInterface $current_user, ModuleHandlerInterface $module_handler, Connection $connection) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_manager;
  $this->currentUser = $current_user;
  $this->moduleHandler = $module_handler;
  $this->connection = $connection;
}