本文整理匯總了PHP中Concrete\Core\Page\Page::getCollectionParentIDFromChildID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Page::getCollectionParentIDFromChildID方法的具體用法?PHP Page::getCollectionParentIDFromChildID怎麽用?PHP Page::getCollectionParentIDFromChildID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Concrete\Core\Page\Page
的用法示例。
在下文中一共展示了Page::getCollectionParentIDFromChildID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct(Page $startingParentPage, Page $currentPage = null)
{
parent::__construct();
$this->startingParentPage = $startingParentPage;
if (is_object($currentPage)) {
$this->trail = array($currentPage->getCollectionID());
$cParentID = Page::getCollectionParentIDFromChildID($currentPage->getCollectionID());
while ($cParentID > 0) {
$this->trail[] = $cParentID;
$cParentID = Page::getCollectionParentIDFromChildID($cParentID);
}
}
// pop off the dashboard node
array_pop($this->trail);
$this->currentPage = $currentPage;
}
示例2: getCollectionParentIDFromChildID
/**
* Get the Parent cID from a page by using a cID.
*
* @param int $cID
*
* @return int
*/
public function getCollectionParentIDFromChildID($cID)
{
return parent::getCollectionParentIDFromChildID($cID);
}