當前位置: 首頁>>代碼示例>>PHP>>正文


PHP eZContentObjectVersion::fetch方法代碼示例

本文整理匯總了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;
 }
開發者ID:CG77,項目名稱:ezpublish-legacy,代碼行數:11,代碼來源:ezpcontentpublishingprocess.php

示例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();
開發者ID:nottavi,項目名稱:ezpublish,代碼行數:31,代碼來源:draft.php

示例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')));
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:31,代碼來源:view.php


注:本文中的eZContentObjectVersion::fetch方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。