protected function DomainMenuAccessMenuBlock::isDomainRestricted in Domain Menu Access 8
Check if domain access has been enabled on this menu.
Parameters
string $menu_name: Menu name.
Return value
bool Config enabled.
1 call to DomainMenuAccessMenuBlock::isDomainRestricted()
- DomainMenuAccessMenuBlock::build in src/
Plugin/ Block/ DomainMenuAccessMenuBlock.php - Builds and returns the renderable array for this block plugin.
File
- src/
Plugin/ Block/ DomainMenuAccessMenuBlock.php, line 67
Class
- DomainMenuAccessMenuBlock
- Provides a Domain Access Menu block.
Namespace
Drupal\domain_menu_access\Plugin\BlockCode
protected function isDomainRestricted($menu_name) {
$config = \Drupal::config('domain_menu_access.settings')
->get('menu_enabled');
return in_array($menu_name, $config);
}