public function ComponentBlock::__construct in Component blocks 1.0.x
Same name and namespace in other branches
- 1.x src/Plugin/Block/ComponentBlock.php \Drupal\component_blocks\Plugin\Block\ComponentBlock::__construct()
- 1.1.x src/Plugin/Block/ComponentBlock.php \Drupal\component_blocks\Plugin\Block\ComponentBlock::__construct()
Constructs a new ComponentBlock.
Parameters
array $configuration: Configuration.
string $plugin_id: Plugin Id.
array $plugin_definition: Plugin definition.
\Drupal\ui_patterns\UiPatternsManager $uiPatternsManager: Plugin manager.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager.
\Drupal\Core\Plugin\Context\ContextHandlerInterface $contextHandler: Context handler.
\Drupal\Core\Field\FormatterPluginManager $formatterPluginManager: Formatter manager.
\Drupal\Core\Utility\Token $token: Token service.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ ComponentBlock.php, line 97
Class
- ComponentBlock
- Defines a class for a specially shaped block.
Namespace
Drupal\component_blocks\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, UiPatternsManager $uiPatternsManager, EntityTypeManagerInterface $entityTypeManager, ContextHandlerInterface $contextHandler, FormatterPluginManager $formatterPluginManager, Token $token) {
$this->uiPatternsManager = $uiPatternsManager;
$this->entityTypeManager = $entityTypeManager;
$this->contextHandler = $contextHandler;
$this->formatterPluginManager = $formatterPluginManager;
$this->token = $token;
// This has to be last because the parent constructor calls
// ::setConfiguration.
parent::__construct($configuration, $plugin_id, $plugin_definition);
}