本文整理匯總了PHP中Page_Controller::BreadcrumbParts方法的典型用法代碼示例。如果您正苦於以下問題:PHP Page_Controller::BreadcrumbParts方法的具體用法?PHP Page_Controller::BreadcrumbParts怎麽用?PHP Page_Controller::BreadcrumbParts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Page_Controller
的用法示例。
在下文中一共展示了Page_Controller::BreadcrumbParts方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: BreadcrumbParts
/**
* manipulates the parts the pages breadcrumbs if a product detail view is
* requested.
*
* @param int $maxDepth maximum depth level of shown pages in breadcrumbs
* @param bool $unlinked true, if the breadcrumbs should be displayed without links
* @param string $stopAtPageType name of pagetype to stop at
* @param bool $showHidden true, if hidden pages should be displayed in breadcrumbs
* @param bool $showProductTitle true, if product title should be displayed in breadcrumbs
*
* @return ArrayList
*
* @author Sebastian Diel <sdiel@pixeltricks.de>, Patrick Schneider <pschneider@pixeltricks.de>
* @since 09.10.2012
*/
public function BreadcrumbParts($maxDepth = 20, $unlinked = false, $stopAtPageType = false, $showHidden = false, $showProductTitle = false)
{
$parts = parent::BreadcrumbParts($maxDepth, $unlinked, $stopAtPageType, $showHidden);
if ($this->isProductDetailView()) {
if ($showProductTitle) {
$title = new Text();
$title->setValue($this->getDetailViewProduct()->Title);
$parts->push(new ArrayData(array('MenuTitle' => $title, 'Title' => $title, 'Link' => '')));
}
}
$this->extend('updateBreadcrumbParts', $parts);
return $parts;
}