本文整理匯總了PHP中eZContentBrowse::hasAttribute方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZContentBrowse::hasAttribute方法的具體用法?PHP eZContentBrowse::hasAttribute怎麽用?PHP eZContentBrowse::hasAttribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZContentBrowse
的用法示例。
在下文中一共展示了eZContentBrowse::hasAttribute方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$Offset = $Params['Offset'];
if (!is_numeric($Offset)) {
$Offset = 0;
}
$parents = array();
// Make sure user has session (if not, then this can't possible be a valid browse request)
if (!eZSession::userHasSessionCookie()) {
return $Module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
// Check that Browse parameters exists
if (!$http->hasSessionVariable('BrowseParameters')) {
return $Module->handleError(eZError::KERNEL_NOT_FOUND, 'kernel');
}
// Check if node parameters exist
$browse = new eZContentBrowse();
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);