protected function DomainMenuLinkTreeManipulators::isAvailableOnAllAffiliates in Domain Menu Access 8
Check if menu link content is allowed on all affiliates.
Parameters
\Drupal\menu_link_content\Entity\MenuLinkContent $entity: Menu link content.
Return value
bool
1 call to DomainMenuLinkTreeManipulators::isAvailableOnAllAffiliates()
- DomainMenuLinkTreeManipulators::menuLinkCheckAccess in src/
Menu/ DomainMenuLinkTreeManipulators.php - Checks access for one menu link instance.
File
- src/
Menu/ DomainMenuLinkTreeManipulators.php, line 147
Class
- DomainMenuLinkTreeManipulators
- Provides a couple of menu link tree manipulators.
Namespace
Drupal\domain_menu_access\MenuCode
protected function isAvailableOnAllAffiliates(MenuLinkContent $entity) {
if ($entity
->get(DOMAIN_ACCESS_ALL_FIELD)
->isEmpty()) {
return FALSE;
}
$all_affiliates = $entity
->get(DOMAIN_ACCESS_ALL_FIELD)
->first()
->getString();
return !empty($all_affiliates);
}