kernel/content/ezcontentoperationcollection.php
static public function updateAlwaysAvailable( $objectID, $newAlwaysAvailable )
    {
        $object = eZContentObject::fetch( $objectID );
        $change = false;

        if ( $object->isAlwaysAvailable() & $newAlwaysAvailable == false )
        {
            $object->setAlwaysAvailableLanguageID( false );
            $change = true;
        }
        else if ( !$object->isAlwaysAvailable() & $newAlwaysAvailable == true )
        {
            $object->setAlwaysAvailableLanguageID( $object->attribute( 'initial_language_id' ) );
            $change = true;
        }
        if ( $change )
        {
            eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
            if ( !eZSearch::getEngine() instanceof eZSearchEngine )
            {
                eZContentOperationCollection::registerSearchObject( $objectID );
            }
        }

        return array( 'status' => true );
    }
static public function updateAlwaysAvailable( $objectID, $newAlwaysAvailable )
    {
        $object = eZContentObject::fetch( $objectID );
        $change = false;

        if ( $object->isAlwaysAvailable() & $newAlwaysAvailable == false )
        {
            $object->setAlwaysAvailableLanguageID( false );
            $change = true;
        }
        else if ( !$object->isAlwaysAvailable() & $newAlwaysAvailable == true )
        {
            $object->setAlwaysAvailableLanguageID( $object->attribute( 'initial_language_id' ) );
            $change = true;
        }
        if ( $change )
        {
            eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
            if ( !eZSearch::getEngine() instanceof eZSearchEngine )
            {
                eZContentOperationCollection::registerSearchObject( $objectID );
            }
        }

        return array( 'status' => true );
    }
static public function updateAlwaysAvailable ( $ objectID , $ newAlwaysAvailable ) { $ object = eZContentObject :: fetch ( $ objectID ) ; $ change = false ; if ( $ object -> isAlwaysAvailable ( ) & $ newAlwaysAvailable == false ) { $ object -> setAlwaysAvailableLanguageID ( false ) ; $ change = true ; } else if ( ! $ object -> isAlwaysAvailable ( ) & $ newAlwaysAvailable == true ) { $ object -> setAlwaysAvailableLanguageID ( $ object -> attribute ( 'initial_language_id' ) ) ; $ change = true ; } if ( $ change ) { eZContentCacheManager :: clearContentCacheIfNeeded ( $ objectID ) ; if ( ! eZSearch :: getEngine ( ) instanceof eZSearchEngine ) { eZContentOperationCollection :: registerSearchObject ( $ objectID ) ; } } return array ( 'status' => true ) ; }
Set the always available flag for a content object

@param int $objectID
@param int $newAlwaysAvailable
@return array An array with operation status, always true
Set the always available flag for a content object