public function FootermapBlock::__construct in footermap: a footer site map 8
Construct with dependencies injected.
Parameters
array $configuration: The configuration array.
string $plugin_id: The block plugin id.
mixed $plugin_definition: The block plugin definition.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The entity_type.manager service.
\Drupal\Core\Entity\EntityRepositoryInterface $entityRepository: The entity.repository service.
\Drupal\Core\Menu\MenuLinkTreeInterface $menu_tree: The menu.link_tree service.
\Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager: The plugin.manager.menu_link service.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The Logger Channel Factory service.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ FootermapBlock.php, line 93
Class
- FootermapBlock
- Provide a footer-based site map block based on menu items.
Namespace
Drupal\footermap\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_manager, EntityRepositoryInterface $entityRepository, MenuLinkTreeInterface $menu_tree, MenuLinkManagerInterface $menu_link_manager, LoggerChannelFactoryInterface $logger_factory) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityManager = $entity_manager;
$this->entityRepository = $entityRepository;
$this->menuTree = $menu_tree;
$this->menuLinkManager = $menu_link_manager;
$this->logger = $logger_factory
->get('footermap');
}