updateContent() 추상적인 공개 메소드

Updates an existing content identified by $contentId in respect to $struct.
abstract public updateContent ( integer $contentId, eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct $struct, eZ\Publish\SPI\Persistence\Content\VersionInfo $prePublishVersionInfo = null )
$contentId integer
$struct eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct
$prePublishVersionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo Provided on publish
 /**
  * Updates an existing content identified by $contentId in respect to $struct
  *
  * @param int $contentId
  * @param \eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct $struct
  * @param \eZ\Publish\SPI\Persistence\Content\VersionInfo $prePublishVersionInfo Provided on publish
  *
  * @return void
  */
 public function updateContent($contentId, MetadataUpdateStruct $struct, VersionInfo $prePublishVersionInfo = null)
 {
     try {
         return $this->innerGateway->updateContent($contentId, $struct, $prePublishVersionInfo);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
예제 #2
0
 /**
  * Updates a content object meta data, identified by $contentId.
  *
  * @param int $contentId
  * @param \eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct $content
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo
  */
 public function updateMetadata($contentId, MetadataUpdateStruct $content)
 {
     $this->contentGateway->updateContent($contentId, $content);
     $this->updatePathIdentificationString($contentId, $content);
     return $this->loadContentInfo($contentId);
 }