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

Updates existing content objects from $fromType to $toType.
abstract public updateContentObjects ( eZ\Publish\SPI\Persistence\Content\Type $fromType, eZ\Publish\SPI\Persistence\Content\Type $toType )
$fromType eZ\Publish\SPI\Persistence\Content\Type
$toType eZ\Publish\SPI\Persistence\Content\Type
Пример #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);
 }