|
Perforce Chronicle 2012.2/486814
API Documentation
|
Essentially the head title helper under a different name. More...
Public Member Functions | |
| bodyTitle ($title=null, $setType=null) | |
| Expose the head title helper under a different name. | |
| toString ($indent=null, $locale=null) | |
| Turn helper into string - overrides parent to strip the title tag and fall back to the head title if no body title has been set. | |
Protected Member Functions | |
| _getLeadingHeadTitle () | |
| Get the first component of the head title. | |
Protected Attributes | |
| $_regKey = 'P4Cms_View_Helper_BodyTitle' | |
Essentially the head title helper under a different name.
Falls back to the first component of the headTitle helper if no body title is explicitly set.
| P4Cms_View_Helper_BodyTitle::_getLeadingHeadTitle | ( | ) | [protected] |
Get the first component of the head title.
{
$headTitle = $this->view->getHelper('headTitle');
foreach ($headTitle as $title) {
return $title;
}
return '';
}
| P4Cms_View_Helper_BodyTitle::bodyTitle | ( | $ | title = null, |
| $ | setType = null |
||
| ) |
Expose the head title helper under a different name.
| string | $title | a title to set. |
| string | $setType | whether to set, prepend or append the title. |
{
return parent::headTitle($title, $setType);
}
| P4Cms_View_Helper_BodyTitle::toString | ( | $ | indent = null, |
| $ | locale = null |
||
| ) |
Turn helper into string - overrides parent to strip the title tag and fall back to the head title if no body title has been set.
| string | null | $indent | how much to indent the output |
| string | null | $locale | the locale to inform translation |
Reimplemented from P4Cms_View_Helper_HeadTitle.
{
$output = $this->_stripTitleTag(parent::toString($indent, $locale));
if (!$output) {
$output = $this->_getLeadingHeadTitle();
$output = ($this->_autoEscape) ? $this->_escape($output) : $output;
}
return $output;
}
P4Cms_View_Helper_BodyTitle::$_regKey = 'P4Cms_View_Helper_BodyTitle' [protected] |
Reimplemented from P4Cms_View_Helper_HeadTitle.