You are here

public function WebformAccessGroupEntityBlock::__construct in Webform 8.5

Creates a WebformAccessGroupEntityBlock 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\Session\AccountInterface $current_user: The current user.

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

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

Overrides BlockPluginTrait::__construct

File

modules/webform_access/src/Plugin/Block/WebformAccessGroupEntityBlock.php, line 60

Class

WebformAccessGroupEntityBlock
Provides a 'webform_access_group_entity' block.

Namespace

Drupal\webform_access\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $current_user;
  $this->webformAccessGroupStorage = $entity_type_manager
    ->getStorage('webform_access_group');
  $this->languageManager = $language_manager;
}