Perforce Chronicle 2012.2/486814
API Documentation

P4Cms_View_Helper_Module Class Reference

View helper that returns an instance of the named module. More...

List of all members.

Public Member Functions

 module ($name)
 Get an enabled module by name.

Detailed Description

View helper that returns an instance of the named module.

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

P4Cms_View_Helper_Module::module ( name)

Get an enabled module by name.

Parameters:
string$namethe name of the module to fetch.
    {
        $module = P4Cms_Module::fetch($name);
        if (!$module->isEnabled()) {
            throw new P4Cms_Module_Exception(
                "Cannot access $name module. Module is disabled."
            );
        }

        return $module;
    }

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