You are here

public function TBMegaMenuBuilder::__construct in The Better Mega Menu 2.x

Same name and namespace in other branches
  1. 8 src/TBMegaMenuBuilder.php \Drupal\tb_megamenu\TBMegaMenuBuilder::__construct()

Constructs a TBMegaMenuBuilder.

Parameters

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory service.

\Drupal\Core\Menu\MenuLinkTreeInterface $menu_tree: The menu link service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The entity manager service.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher service.

\Drupal\Core\Menu\MenuTreeStorageInterface $menu_storage: The menu tree storage service.

File

src/TBMegaMenuBuilder.php, line 70

Class

TBMegaMenuBuilder
Defines a TBMegaMenuBuilder.

Namespace

Drupal\tb_megamenu

Code

public function __construct(LoggerChannelFactoryInterface $logger_factory, MenuLinkTreeInterface $menu_tree, EntityTypeManagerInterface $entity_manager, PathMatcherInterface $path_matcher, MenuTreeStorageInterface $menu_storage) {
  $this->logger = $logger_factory
    ->get('tb_megamenu');
  $this->menuTree = $menu_tree;
  $this->entityTypeManager = $entity_manager;
  $this->pathMatcher = $path_matcher;
  $this->menuStorage = $menu_storage;
}