public function DraggableBlock::__construct in Draggable dashboard 8.2
Same name and namespace in other branches
- 8 src/Plugin/Block/DraggableBlock.php \Drupal\draggable_dashboard\Plugin\Block\DraggableBlock::__construct()
DraggableBlock constructor.
Parameters
array $configuration: Plugin configuration.
string $plugin_id: Plugin id.
array $plugin_definition: Plugin definition.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity Type Manager.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: Request stack.
\Drupal\Core\Routing\RouteMatchInterface $route_match: Current Route Matcher.
\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.
\Drupal\Core\Controller\TitleResolverInterface $title_resolver: Title resolver.
\Drupal\Core\Block\BlockManagerInterface $block_plugin_manager: Block manager.
\Drupal\Core\Session\AccountProxyInterface $current_user: Current user.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ DraggableBlock.php, line 97
Class
- DraggableBlock
- Provides a draggable block with a simple text.
Namespace
Drupal\draggable_dashboard\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityTypeManagerInterface $entity_type_manager, RequestStack $request_stack, RouteMatchInterface $route_match, TitleResolverInterface $title_resolver, BlockManagerInterface $block_plugin_manager, AccountProxyInterface $current_user) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->titleResolver = $title_resolver;
$this->entityTypeManager = $entity_type_manager;
$this->blockManager = $block_plugin_manager;
$this->currentUser = $current_user;
$this->routeMatch = $route_match;
$this->requestStack = $request_stack;
}