本文整理匯總了PHP中eZInformationCollection::fetch方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZInformationCollection::fetch方法的具體用法?PHP eZInformationCollection::fetch怎麽用?PHP eZInformationCollection::fetch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZInformationCollection
的用法示例。
在下文中一共展示了eZInformationCollection::fetch方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fetchCollectedInfoCollection
static public function fetchCollectedInfoCollection( $collectionID, $contentObjectID )
{
$collection = false;
if ( $collectionID )
$collection = eZInformationCollection::fetch( $collectionID );
else if ( $contentObjectID )
{
$userIdentifier = eZInformationCollection::currentUserIdentifier();
$collection = eZInformationCollection::fetchByUserIdentifier( $userIdentifier, $contentObjectID );
}
return array( 'result' => $collection );
}
示例2: array
<?php
/**
* @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
* @version 2012.8
* @package kernel
*/
$http = eZHTTPTool::instance();
$Module = $Params['Module'];
$collectionID = $Params['CollectionID'];
$collection = false;
$object = false;
if (is_numeric($collectionID)) {
$collection = eZInformationCollection::fetch($collectionID);
}
if (!$collection) {
return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
$object = eZContentObject::fetch($collection->attribute('contentobject_id'));
if (!$object) {
return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
$objectID = $collection->attribute('contentobject_id');
$objectName = $object->attribute('name');
$tpl = eZTemplate::factory();
$tpl->setVariable('module', $Module);
$tpl->setVariable('collection', $collection);
$Result = array();
$Result['content'] = $tpl->fetch('design:infocollector/view.tpl');
$Result['path'] = array(array('url' => '/infocollector/overview', 'text' => ezpI18n::tr('kernel/infocollector', 'Collected information')), array('url' => '/infocollector/collectionlist/' . $objectID, 'text' => $objectName), array('url' => false, 'text' => $collectionID));