|
Perforce Chronicle 2012.2/486814
API Documentation
|
Provides a facility for dynamic menu entries. More...
Public Member Functions | |
| getHandler () | |
| Returns the id of the dynamic handler associated with this item. | |
| getHref () | |
| Implement getHref as it is abstract in parent. | |
| getLabel () | |
| If we have a handler set, and no label has been set on this page, returns the handlers label. | |
| setHandler ($id) | |
| Set the id of the dynamic handler associated with this item. | |
| toArray () | |
| Returns an array representation of the page. | |
Protected Attributes | |
| $_handler | |
Provides a facility for dynamic menu entries.
Dynamic menu items will be expanded by the associated DynamicHandler when accessed via getExpandedContainer on a Menu instance.
| P4Cms_Navigation_Page_Dynamic::getHandler | ( | ) |
Returns the id of the dynamic handler associated with this item.
{
return $this->_handler;
}
| P4Cms_Navigation_Page_Dynamic::getHref | ( | ) |
Implement getHref as it is abstract in parent.
We don't actually use it so returns ""
{
return "";
}
| P4Cms_Navigation_Page_Dynamic::getLabel | ( | ) |
If we have a handler set, and no label has been set on this page, returns the handlers label.
Otherwise returns the title as per normal.
{
if ($this->_label || !$this->getHandler()) {
return $this->_label;
}
return P4Cms_Navigation_DynamicHandler::fetch($this->getHandler())->getLabel();
}
| P4Cms_Navigation_Page_Dynamic::setHandler | ( | $ | id | ) |
Set the id of the dynamic handler associated with this item.
| string | null | $id | id of the associated dynamic handler or null for none |
{
$this->_handler = $id;
return $this;
}
| P4Cms_Navigation_Page_Dynamic::toArray | ( | ) |
Returns an array representation of the page.
{
return array_merge(
parent::toArray(),
array(
'handler' => $this->getHandler(),
'label' => $this->_label
)
);
}
P4Cms_Navigation_Page_Dynamic::$_handler [protected] |