You are here

public function AuthcacheMenuItemTitleFragment::load in Authenticated User Page Caching (Authcache) 7.2

Load requested menu items.

Overrides AuthcacheP13nFragmentLoaderInterface::load

File

modules/authcache_menu/includes/AuthcacheMenuItemTitleFragment.inc, line 16
Defines an authcache fragment for returning personalized menu titles.

Class

AuthcacheMenuItemTitleFragment
Render personalized menu titles.

Code

public function load($paths, $context) {
  $items = array();
  foreach ($paths as $path) {
    $item = menu_link_get_preferred($path);
    if (empty($item)) {
      throw new AuthcacheP13nRequestNotFound();
    }
    $items[$path] = $item;
  }
  return $items;
}