Ejemplo n.º 1
0
 /**
  * Updates the metadata.
  *
  * (see {@link ContentMetadataUpdateStruct}) of a content object - to update fields use updateContent
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to update the content meta data
  * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the remoteId in $contentMetadataUpdateStruct is set but already exists
  *
  * @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo
  * @param \eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct $contentMetadataUpdateStruct
  *
  * @return \eZ\Publish\API\Repository\Values\Content\Content the content with the updated attributes
  */
 public function updateContentMetadata( ContentInfo $contentInfo, ContentMetadataUpdateStruct $contentMetadataUpdateStruct )
 {
     $returnValue = $this->service->updateContentMetadata( $contentInfo, $contentMetadataUpdateStruct );
     $this->signalDispatcher->emit(
         new UpdateContentMetadataSignal(
             array(
                 'contentId' => $contentInfo->id,
             )
         )
     );
     return $returnValue;
 }