public function publish($contentTypeId)
    {
        $toType = $this->load($contentTypeId, Type::STATUS_DRAFT);

        try {
            $fromType = $this->load($contentTypeId, Type::STATUS_DEFINED);
            $this->updateHandler->updateContentObjects($fromType, $toType);
            $this->updateHandler->deleteOldType($fromType);
        } catch (Exception\TypeNotFound $e) {
            // If no old type is found, no updates are necessary to it
        }

        $this->updateHandler->publishNewType($toType, Type::STATUS_DEFINED);
    }
public function publish($contentTypeId)
    {
        $toType = $this->load($contentTypeId, Type::STATUS_DRAFT);

        try {
            $fromType = $this->load($contentTypeId, Type::STATUS_DEFINED);
            $this->updateHandler->updateContentObjects($fromType, $toType);
            $this->updateHandler->deleteOldType($fromType);
        } catch (Exception\TypeNotFound $e) {
            // If no old type is found, no updates are necessary to it
        }

        $this->updateHandler->publishNewType($toType, Type::STATUS_DEFINED);
    }
public function publish ( $ contentTypeId ) { $ toType = $ this -> load ( $ contentTypeId , Type :: STATUS_DRAFT ) ; try { $ fromType = $ this -> load ( $ contentTypeId , Type :: STATUS_DEFINED ) ; $ this -> updateHandler -> updateContentObjects ( $ fromType , $ toType ) ; $ this -> updateHandler -> deleteOldType ( $ fromType ) ; } catch ( Exception \ TypeNotFound $ e ) { // If no old type is found, no updates are necessary to it } $ this -> updateHandler -> publishNewType ( $ toType , Type :: STATUS_DEFINED ) ; }
Update content objects.

Updates content objects, depending on the changed field definitions.

A content type has a state which tells if its content objects yet have
been adapted.

Flags the content type as updated.

@param mixed $contentTypeId
Update content objects .