publishTypeAndFields() abstract public méthode

Publishes the Type with $typeId from $sourceVersion to $targetVersion, including its fields.
abstract public publishTypeAndFields ( integer $typeId, integer $sourceStatus, integer $targetStatus )
$typeId integer
$sourceStatus integer
$targetStatus integer
 /**
  * Publishes the Type with $typeId from $sourceVersion to $targetVersion,
  * including its fields.
  *
  * @param int $typeId
  * @param int $sourceStatus
  * @param int $targetStatus
  */
 public function publishTypeAndFields($typeId, $sourceStatus, $targetStatus)
 {
     try {
         return $this->innerGateway->publishTypeAndFields($typeId, $sourceStatus, $targetStatus);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
 /**
  * Publishes $toType to $newStatus.
  *
  * @param \eZ\Publish\SPI\Persistence\Content\Type $toType
  * @param int $newStatus
  */
 public function publishNewType(Type $toType, $newStatus)
 {
     $this->contentTypeGateway->publishTypeAndFields($toType->id, $toType->status, Type::STATUS_MODIFIED);
     $script = \eZScheduledScript::create('syncobjectattributes.php', \eZINI::instance('ezscriptmonitor.ini')->variable('GeneralSettings', 'PhpCliCommand') . ' extension/ezscriptmonitor/bin/' . \eZScheduledScript::SCRIPT_NAME_STRING . ' -s ' . \eZScheduledScript::SITE_ACCESS_STRING . ' --classid=' . $toType->id);
     $script->store();
 }
 /**
  * Publishes $toType to $newStatus
  *
  * @param \eZ\Publish\SPI\Persistence\Content\Type $toType
  * @param int $newStatus
  *
  * @return void
  */
 public function publishNewType(Type $toType, $newStatus)
 {
     $this->contentTypeGateway->publishTypeAndFields($toType->id, $toType->status, $newStatus);
 }