You are here

function authcache_menu_tab_root_blacklist in Authenticated User Page Caching (Authcache) 7.2

Return tab_roots where tabs may differ for users with the same role set.

Parameters

int $type_mask: One of MENU_IS_LOCAL_TASK or MENU_IS_LOCAL_ACTION

Return value

array A list of tab root paths of pages where personalization of tabs and actions respectively is necessary.

1 call to authcache_menu_tab_root_blacklist()
authcache_menu_preprocess_page in modules/authcache_menu/authcache_menu.module
Implements hook_preprocess_page().

File

modules/authcache_menu/authcache_menu.module, line 149
Authcache support for menu, tabs and local actions.

Code

function authcache_menu_tab_root_blacklist($type_mask = MENU_IS_LOCAL_TASK) {
  $blacklist =& drupal_static(__FUNCTION__);
  $cid = 'authcache_menu_tab_root_blacklist:' . dechex($type_mask);
  if (!isset($blacklist[$type_mask])) {
    if ($cached = cache_get($cid, 'cache_menu')) {
      $blacklist[$type_mask] = $cached->data;
    }
    else {
      $type_map = _authcache_menu_tab_root_type_map_load();
      $tab_list = _authcache_menu_tab_root_list($type_map, $type_mask);
      drupal_alter('authcache_menu_tab_root_blacklist', $tab_list, $type_mask);
      $blacklist[$type_mask] = $tab_list;
      cache_set($cid, $blacklist[$type_mask], 'cache_menu');
    }
  }
  return $blacklist[$type_mask];
}