public function TBMegaMenuBlock::__construct in The Better Mega Menu 2.x
Same name in this branch
- 2.x src/Plugin/Derivative/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Derivative\TBMegaMenuBlock::__construct()
- 2.x src/Plugin/Block/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Block\TBMegaMenuBlock::__construct()
Same name and namespace in other branches
- 8 src/Plugin/Block/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Block\TBMegaMenuBlock::__construct()
Constructs a TBMegaMenuBlock.
Parameters
array $configuration: Configuration array.
string $plugin_id: The plugin id.
mixed $plugin_definition: The plugin definition.
\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager service.
\Drupal\tb_megamenu\TBMegaMenuBuilderInterface $menu_builder: The menu builder service.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ TBMegaMenuBlock.php, line 60
Class
- TBMegaMenuBlock
- Provides blocks which belong to TB Mega Menu.
Namespace
Drupal\tb_megamenu\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ThemeManagerInterface $theme_manager, TBMegaMenuBuilderInterface $menu_builder) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->themeManager = $theme_manager;
$this->menuBuilder = $menu_builder;
}