eZ\Publish\Core\Persistence\Legacy\Content\Type\Update\Handler::publishNewType PHP Метод

publishNewType() абстрактный публичный Метод

Publishes $toType to $newStatus.
abstract public publishNewType ( eZ\Publish\SPI\Persistence\Content\Type $toType, integer $newStatus )
$toType eZ\Publish\SPI\Persistence\Content\Type
$newStatus integer
    public abstract function publishNewType(Type $toType, $newStatus);

Usage Example

Пример #1
0
 /**
  * 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
  *
  * @return void
  */
 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) {
     }
     $this->updateHandler->publishNewType($toType, Type::STATUS_DEFINED);
 }