Perforce Chronicle 2012.2/486814
API Documentation

Menu_IndexController Class Reference

Provides server-side menu support. More...

List of all members.

Public Member Functions

 sitemapAction ()
 Serve site map created from the 'sitemap' menu.

Public Attributes

 $contexts

Detailed Description

Provides server-side menu support.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Member Function Documentation

Menu_IndexController::sitemapAction ( )

Serve site map created from the 'sitemap' menu.

    {
        // set page title
        $this->view->headTitle()->set('Sitemap');

        // get sitemap menu from storage or supply blank one if it doesn't exists
        $menu = P4Cms_Menu::exists('sitemap')
            ? P4Cms_Menu::fetch('sitemap')
            : new P4Cms_Menu;

        // tag the page cache so it can be appropriately cleared later
        if (P4Cms_Cache::canCache('page')) {
            P4Cms_Cache::getCache('page')
                ->addTag('p4cms_menu')
                ->addTag('p4cms_menu_' . bin2hex('sitemap'));
        }

        $this->view->menu    = $menu;
        $this->view->sitemap = $menu->getExpandedContainer();
    }

Member Data Documentation

Menu_IndexController::$contexts
Initial value:
 array(
        'sitemap' => array('xml'),
    )

The documentation for this class was generated from the following file: