public function AckMenuMap::objectRealms in Access Control Kit 7
Overrides AccessControlKitHandler::objectRealms().
Overrides AccessControlKitHandler::objectRealms
1 call to AckMenuMap::objectRealms()
- AckMenuMap::objectFormAlter in ack_menu/
handlers/ ack_menu_map.inc - Overrides AccessControlKitHandler::objectFormAlter().
File
- ack_menu/
handlers/ ack_menu_map.inc, line 113 - Contains the handler class for mapping menu links to access realms.
Class
- AckMenuMap
- Controls access to menu links based on realm mapping.
Code
public function objectRealms($object_type, $menu_link) {
// See if this link is mapped to a realm.
$realm = $this
->mappedRealm($menu_link['mlid']);
// If no mapping was found, try the link's parent.
if (!isset($realm) && !empty($menu_link['plid'])) {
$parent = menu_link_load($menu_link['plid']);
if (!empty($parent)) {
return $this
->objectRealms($object_type, $parent);
}
}
return isset($realm) ? array(
$realm,
) : array();
}