public function ExtraFieldBlockPlugin::__construct in Entity Extra Field 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/ExtraFieldType/ExtraFieldBlockPlugin.php \Drupal\entity_extra_field\Plugin\ExtraFieldType\ExtraFieldBlockPlugin::__construct()
Extra field block plugin constructor.
Parameters
array $configuration: The plugin configuration.
string $plugin_id: The plugin identifier.
array $plugin_definition: The plugin definition.
\Drupal\Core\Utility\Token $token: The token service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Session\AccountInterface $current_user: The current logged in user object.
\Drupal\Core\Routing\RouteMatchInterface $current_route_match: The current route match service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager service.
\Drupal\Core\Block\BlockManagerInterface $block_manager: The block manager service.
Overrides ExtraFieldTypePluginBase::__construct
File
- src/
Plugin/ ExtraFieldType/ ExtraFieldBlockPlugin.php, line 73
Class
- ExtraFieldBlockPlugin
- Define extra field block type.
Namespace
Drupal\entity_extra_field\Plugin\ExtraFieldTypeCode
public function __construct(array $configuration, string $plugin_id, array $plugin_definition, Token $token, ModuleHandlerInterface $module_handler, AccountInterface $current_user, RouteMatchInterface $current_route_match, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, BlockManagerInterface $block_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $token, $module_handler, $current_route_match, $entity_type_manager, $entity_field_manager);
$this->currentUser = $current_user;
$this->blockManager = $block_manager;
}