Perforce Chronicle 2012.2/486814
API Documentation
|
Extends Zend_Form_Decorator_HtmlTag to make it aware of content records. More...
Public Member Functions | |
getContentRecord () | |
Get the associated content record (if set). | |
render ($content) | |
Sets the href option to the uri of the content record, then renders using the parent method. | |
setContentRecord ($content) | |
Set the associated content record for this element. | |
Protected Attributes | |
$_contentRecord = null | |
$_tag = 'a' |
Extends Zend_Form_Decorator_HtmlTag to make it aware of content records.
This allows the decorator to create links to view the content.
Content_Form_Decorator_ContentLink::getContentRecord | ( | ) |
Get the associated content record (if set).
Implements P4Cms_Content_EnhancedDecoratorInterface.
{
return $this->_contentRecord;
}
Content_Form_Decorator_ContentLink::render | ( | $ | content | ) |
Sets the href option to the uri of the content record, then renders using the parent method.
string | $content | The content to decorate. |
{ $this->setOption('href', $this->getContentRecord()->getUri()); return parent::render($content); }
Content_Form_Decorator_ContentLink::setContentRecord | ( | $ | content | ) |
Set the associated content record for this element.
P4Cms_Content | $content | the associated content record for this element. |
Implements P4Cms_Content_EnhancedDecoratorInterface.
{
$this->_contentRecord = $content;
return $this;
}
Content_Form_Decorator_ContentLink::$_contentRecord = null [protected] |
Content_Form_Decorator_ContentLink::$_tag = 'a' [protected] |