本文整理汇总了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));