public function TBMegaMenuBuilder::getMenus in The Better Mega Menu 8
Same name and namespace in other branches
- 2.x src/TBMegaMenuBuilder.php \Drupal\tb_megamenu\TBMegaMenuBuilder::getMenus()
Get menus that belongs TB mega menu.
Parameters
string $menu_name: The menu machine name.
string $theme: The theme machine name.
Return value
\Drupal\tb_megamenu\MegaMenuConfigInterface|null The configuration entity for this menu or NULL if not found.
Overrides TBMegaMenuBuilderInterface::getMenus
2 calls to TBMegaMenuBuilder::getMenus()
- TBMegaMenuBuilder::getBlockConfig in src/
TBMegaMenuBuilder.php - Get the configuration of blocks.
- TBMegaMenuBuilder::getMenuConfig in src/
TBMegaMenuBuilder.php - Get configuration of menu.
File
- src/
TBMegaMenuBuilder.php, line 89
Class
- TBMegaMenuBuilder
- Defines a TBMegaMenuBuilder.
Namespace
Drupal\tb_megamenuCode
public function getMenus(string $menu_name, string $theme) {
$config = MegaMenuConfig::loadMenu($menu_name, $theme);
if ($config === NULL) {
$this->logger
->warning("Could not find TB Megamenu configuration for menu: @menu, theme: @theme", [
'@menu' => $menu_name,
'@theme' => $theme,
]);
}
return $config;
}