kernel/private/classes/ezcontentobjectstategroup.php
public function store( $fieldFilters = null )
    {
        $db = eZDB::instance();

        $db->begin();

        $languageMask = 1;
        // set language mask and always available bits
        foreach ( $this->AllTranslations as $translation )
        {
            if ( $translation->hasData() )
            {
                $languageID = $translation->attribute( 'real_language_id' );
                if ( empty( $this->DefaultLanguageID ) )
                {
                    $this->DefaultLanguageID = $languageID & ~1;
                }
                // if default language, set always available flag
                if ( $languageID & $this->DefaultLanguageID )
                {
                    $translation->setAttribute( 'language_id', $languageID | 1 );
                }
                // otherwise, remove always available flag if it's set
                else
                {
                    $translation->setAttribute( 'language_id',  $languageID & ~1 );
                }

                $languageMask = $languageMask | $languageID;
            }
        }
        $this->setAttribute( 'language_mask', $languageMask );

        // store state group
        eZPersistentObject::storeObject( $this, $fieldFilters );

        // store or remove translations
        foreach ( $this->AllTranslations as $translation )
        {
            if ( !$translation->hasData() )
            {
                // the name and description are empty
                // so the translation needs to be removed if it was stored before
                if ( $translation->attribute( 'contentobject_state_group_id' ) !== null )
                {
                    $translation->remove();
                }
            }
            else
            {
                if ( $translation->attribute( 'contentobject_state_group_id' ) != $this->ID )
                {
                    $translation->setAttribute( 'contentobject_state_group_id', $this->ID );
                }

                $translation->store();
            }
        }

        $handler = eZExpiryHandler::instance();
        $handler->setTimestamp( 'state-limitations', time() );

        $db->commit();
    }
public function store( $fieldFilters = null )
    {
        $db = eZDB::instance();

        $db->begin();

        $languageMask = 1;
        // set language mask and always available bits
        foreach ( $this->AllTranslations as $translation )
        {
            if ( $translation->hasData() )
            {
                $languageID = $translation->attribute( 'real_language_id' );
                if ( empty( $this->DefaultLanguageID ) )
                {
                    $this->DefaultLanguageID = $languageID & ~1;
                }
                // if default language, set always available flag
                if ( $languageID & $this->DefaultLanguageID )
                {
                    $translation->setAttribute( 'language_id', $languageID | 1 );
                }
                // otherwise, remove always available flag if it's set
                else
                {
                    $translation->setAttribute( 'language_id',  $languageID & ~1 );
                }

                $languageMask = $languageMask | $languageID;
            }
        }
        $this->setAttribute( 'language_mask', $languageMask );

        // store state group
        eZPersistentObject::storeObject( $this, $fieldFilters );

        // store or remove translations
        foreach ( $this->AllTranslations as $translation )
        {
            if ( !$translation->hasData() )
            {
                // the name and description are empty
                // so the translation needs to be removed if it was stored before
                if ( $translation->attribute( 'contentobject_state_group_id' ) !== null )
                {
                    $translation->remove();
                }
            }
            else
            {
                if ( $translation->attribute( 'contentobject_state_group_id' ) != $this->ID )
                {
                    $translation->setAttribute( 'contentobject_state_group_id', $this->ID );
                }

                $translation->store();
            }
        }

        $handler = eZExpiryHandler::instance();
        $handler->setTimestamp( 'state-limitations', time() );

        $db->commit();
    }
public function store ( $ fieldFilters = null ) { $ db = eZDB :: instance ( ) ; $ db -> begin ( ) ; $ languageMask = 1 ; // set language mask and always available bits foreach ( $ this -> AllTranslations as $ translation ) { if ( $ translation -> hasData ( ) ) { $ languageID = $ translation -> attribute ( 'real_language_id' ) ; if ( empty ( $ this -> DefaultLanguageID ) ) { $ this -> DefaultLanguageID = $ languageID & ~ 1 ; } // if default language, set always available flag if ( $ languageID & $ this -> DefaultLanguageID ) { $ translation -> setAttribute ( 'language_id' , $ languageID | 1 ) ; } // otherwise, remove always available flag if it's set else { $ translation -> setAttribute ( 'language_id' , $ languageID & ~ 1 ) ; } $ languageMask = $ languageMask | $ languageID ; } } $ this -> setAttribute ( 'language_mask' , $ languageMask ) ; // store state group eZPersistentObject :: storeObject ( $ this , $ fieldFilters ) ; // store or remove translations foreach ( $ this -> AllTranslations as $ translation ) { if ( ! $ translation -> hasData ( ) ) { // the name and description are empty // so the translation needs to be removed if it was stored before if ( $ translation -> attribute ( 'contentobject_state_group_id' ) !== null ) { $ translation -> remove ( ) ; } } else { if ( $ translation -> attribute ( 'contentobject_state_group_id' ) != $ this -> ID ) { $ translation -> setAttribute ( 'contentobject_state_group_id' , $ this -> ID ) ; } $ translation -> store ( ) ; } } $ handler = eZExpiryHandler :: instance ( ) ; $ handler -> setTimestamp ( 'state-limitations' , time ( ) ) ; $ db -> commit ( ) ; }
Stores the content object state group and its translations.

Before storing a content object state group, you should use
{@link eZContentObjectStateGroup::isValid()} to check its validness.

@param array $fieldFilters
Stores the content object state group and its translations .