|
Perforce Chronicle 2012.2/486814
API Documentation
|
View helper that returns an instance of the named module. More...
Public Member Functions | |
| module ($name) | |
| Get an enabled module by name. | |
View helper that returns an instance of the named module.
| P4Cms_View_Helper_Module::module | ( | $ | name | ) |
Get an enabled module by name.
| string | $name | the 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;
}