本文整理汇总了PHP中eZContentBrowse::setStartNode方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentBrowse::setStartNode方法的具体用法?PHP eZContentBrowse::setStartNode怎么用?PHP eZContentBrowse::setStartNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentBrowse
的用法示例。
在下文中一共展示了eZContentBrowse::setStartNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if (!isset($Params['NodeID']) && !isset($Params['NodeList']) && !$browse->hasAttribute('start_node')) {
return $Module->handleError(eZError::KERNEL_NOT_FOUND, 'kernel');
}
// We get node list when browse is execiuted from search engine ( "search in browse" functionality )
if (isset($Params['NodeList'])) {
$nodeList = $Params['NodeList']['SearchResult'];
$nodeListCount = $Params['NodeList']['SearchCount'];
$requestedURI = $Params['NodeList']['RequestedURI'];
$requestedURISuffix = $Params['NodeList']['RequestedURISuffix'];
if (isset($Params['NodeID']) && is_numeric($Params['NodeID'])) {
$NodeID = $Params['NodeID'];
}
} else {
if (isset($Params['NodeID']) && is_numeric($Params['NodeID'])) {
$NodeID = $Params['NodeID'];
$browse->setStartNode($NodeID);
}
$NodeID = $browse->attribute('start_node');
}
if (isset($NodeID)) {
$node = eZContentObjectTreeNode::fetch($NodeID);
if (!$node) {
return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
if ($node->attribute('is_invisible') && !eZContentObjectTreeNode::showInvisibleNodes()) {
return $Module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
$object = $node->attribute('object');
if (!$object) {
return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}