You are here

private function ExpireMenuLink::get_urls_from_menu_tree in Cache Expiration 7.2

Fetches an internal urls from a menu items tree.

1 call to ExpireMenuLink::get_urls_from_menu_tree()
ExpireMenuLink::expire in includes/expire.menu_link.inc
Executes expiration actions for menu link.

File

includes/expire.menu_link.inc, line 54
Provides class that expires menulinks.

Class

ExpireMenuLink
@file Provides class that expires menulinks.

Code

private function get_urls_from_menu_tree($tree) {
  $links = array();
  foreach ($tree as $item) {
    if (empty($item['link']['external']) || $item['link']['link_path'] == '<front>') {
      $links[] = $item['link']['link_path'];
    }
    if (!empty($item['below'])) {
      $links = array_merge($links, $this
        ->get_urls_from_menu_tree($item['below']));
    }
  }
  return $links;
}