public function CheeseburgerMenuBlock::calculateDependencies in Cheeseburger Menu 5.0.x
Overrides BlockPluginTrait::calculateDependencies
File
- src/
Plugin/ Block/ CheeseburgerMenuBlock.php, line 124
Class
- CheeseburgerMenuBlock
- Provides a 'CheeseburgerMenu' block.
Namespace
Drupal\cheeseburger_menu\Plugin\BlockCode
public function calculateDependencies() {
$dependencies = [];
foreach ($this
->getConfigValue('menus', []) as $menu) {
$menu_entity = $this->entityTypeManager
->getStorage($menu['menu_type'])
->load($menu['id']);
$dependencies['config'][] = $menu_entity
->getConfigDependencyName();
}
return array_merge($dependencies, parent::calculateDependencies());
}