本文整理汇总了PHP中eZContentObjectVersion::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObjectVersion::fetch方法的具体用法?PHP eZContentObjectVersion::fetch怎么用?PHP eZContentObjectVersion::fetch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentObjectVersion
的用法示例。
在下文中一共展示了eZContentObjectVersion::fetch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: version
/**
* Returns the version object the process is linked to
* @return eZContentObjectVersion
*/
public function version()
{
if ($this->versionObject === null) {
$this->versionObject = eZContentObjectVersion::fetch($this->attribute('ezcontentobject_version_id'));
}
return $this->versionObject;
}
示例2: foreach
$user = eZUser::currentUser();
if ( !$user->isLoggedIn() )
return $Module->handleError( eZError::KERNEL_ACCESS_DENIED, 'kernel' );
$userID = $user->id();
if ( $http->hasPostVariable( 'RemoveButton' ) )
{
if ( $http->hasPostVariable( 'DeleteIDArray' ) )
{
$deleteIDArray = $http->postVariable( 'DeleteIDArray' );
$db = eZDB::instance();
$db->begin();
foreach ( $deleteIDArray as $deleteID )
{
$version = eZContentObjectVersion::fetch( $deleteID );
if ( $version instanceof eZContentObjectVersion )
{
eZDebug::writeNotice( $deleteID, "deleteID" );
$version->removeThis();
}
}
$db->commit();
}
}
if ( $http->hasPostVariable( 'EmptyButton' ) )
{
$versions = eZContentObjectVersion::fetchForUser( $userID );
$db = eZDB::instance();
$db->begin();
示例3: getenv
} else {
$domain = getenv('HTTP_HOST');
$protocol = eZSys::serverProtocol();
$preFix = $protocol . "://" . $domain;
$preFix .= eZSys::wwwDir();
$link = preg_replace("/^\\//e", "", $link);
$link = $preFix . "/" . $link;
}
$viewParameters = array('offset' => $offset, 'limit' => $limit);
$http = eZHTTPTool::instance();
$objectList = eZURLObjectLink::fetchObjectVersionList($urlID, $viewParameters);
$urlViewCount = eZURLObjectLink::fetchObjectVersionCount($urlID);
if ($Module->isCurrentAction('EditObject')) {
if ($http->hasPostVariable('ObjectList')) {
$versionID = $http->postVariable('ObjectList');
$version = eZContentObjectVersion::fetch($versionID);
$contentObjectID = $version->attribute('contentobject_id');
$versionNr = $version->attribute('version');
$Module->redirect('content', 'edit', array($contentObjectID, $versionNr));
}
}
$tpl = eZTemplate::factory();
$tpl->setVariable('Module', $Module);
$tpl->setVariable('url_object', $url);
$tpl->setVariable('full_url', $link);
$tpl->setVariable('object_list', $objectList);
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('url_view_count', $urlViewCount);
$Result = array();
$Result['content'] = $tpl->fetch('design:url/view.tpl');
$Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('kernel/url', 'URL')), array('url' => false, 'text' => ezpI18n::tr('kernel/url', 'View')));