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


PHP eZContentObjectStateGroup::fetchByOffset方法代碼示例

本文整理匯總了PHP中eZContentObjectStateGroup::fetchByOffset方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZContentObjectStateGroup::fetchByOffset方法的具體用法?PHP eZContentObjectStateGroup::fetchByOffset怎麽用?PHP eZContentObjectStateGroup::fetchByOffset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在eZContentObjectStateGroup的用法示例。


在下文中一共展示了eZContentObjectStateGroup::fetchByOffset方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: attribute

 function attribute($attr)
 {
     switch ($attr) {
         case 'state_group':
             return eZContentObjectStateGroup::fetchByOffset();
         default:
             return eZWorkflowEventType::attribute($attr);
     }
 }
開發者ID:gggeek,項目名稱:ezworkflowcollection,代碼行數:9,代碼來源:objectstateupdatetype.php

示例2: allowedAssignStateList

    /**
     * @param eZUser|null $user
     * @return array
     */
    function allowedAssignStateList( eZUser $user = null )
    {
        $allowedStateIDList = $this->allowedAssignStateIDList( $user );

        // retrieve state groups, and for each state group the allowed states (including the current state)
        $groups = eZContentObjectStateGroup::fetchByOffset( false, false );

        $allowedAssignList = array();
        foreach ( $groups as $group )
        {
            // we do not return any internal state
            // all internal states are prepended with the string : "ez_"
            if( strpos( $group->attribute( 'identifier' ), 'ez' ) === 0 )
                continue;

            $states = array();
            $groupStates = $group->attribute( 'states' );

            $currentStateIDArray = $this->attribute( 'state_id_array' );

            $current = false;
            foreach ( $groupStates as $groupState )
            {
                $stateID = $groupState->attribute( 'id' );
                if ( in_array( $stateID, $allowedStateIDList ) )
                {
                    $states[] = $groupState;
                }

                if ( in_array( $stateID, $currentStateIDArray ) )
                {
                    $current = $groupState;
                }
            }

            $allowedAssignList[] = array( 'group' => $group, 'states' => $states, 'current' => $current );
        }
        return $allowedAssignList;
    }
開發者ID:ezsystemstraining,項目名稱:ez54training,代碼行數:43,代碼來源:ezcontentobject.php

示例3: array

);
$options = $script->getOptions( '', '', array( '-q' => 'Quiet mode' ) );

$cli = eZCLI::instance();

$script->initialize();
$script->startup();

$db = eZDB::instance();

$limit = 50;
$offset = 0;

while ( true )
{
    $groups = eZContentObjectStateGroup::fetchByOffset( $limit, $offset );
    if ( empty( $groups ) )
    {
        break;
    }
    foreach ( $groups as $group )
    {
        $cli->output( 'Fixing translations for group ' . $group->attribute( 'identifier' ), false );
        $groupId = $group->attribute( 'id' );
        $defaultLangId = $group->attribute( 'default_language_id' );

        // for the default language id, the correct record is the one with
        // the always available bit, so we delete records without it
        // ie language_id = real_language_id = $defaultLangId
        $queryDefaultLang = "DELETE FROM ezcobj_state_group_language
            WHERE contentobject_state_group_id={$groupId}
開發者ID:EVE-Corp-Center,項目名稱:ECC-Website,代碼行數:31,代碼來源:deduplicatecontentstategrouplanguage.php


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