You are here

public function SimpleBlockBlock::__construct in Simple Block 8

Constructs a new block plugin 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\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

Overrides BlockPluginTrait::__construct

File

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

Class

SimpleBlockBlock
Defines a generic custom block config type.

Namespace

Drupal\simple_block\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, AccountInterface $current_user) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->currentUser = $current_user;
}