eZPublishCommunityProject  2013.5
eZ\Publish\Core\Repository\ContentService Class Reference
+ Inheritance diagram for eZ\Publish\Core\Repository\ContentService:
+ Collaboration diagram for eZ\Publish\Core\Repository\ContentService:

Public Member Functions

 __construct (RepositoryInterface $repository, Handler $handler, array $settings=array())
 Setups service with reference to repository object that created it & corresponding handler. More...
 
 addRelation (APIVersionInfo $sourceVersion, ContentInfo $destinationContent)
 Adds a relation of type common. More...
 
 addTranslationInfo (TranslationInfo $translationInfo)
 
 buildContentDomainObject (SPIContent $spiContent)
 Builds a Content domain object from value object returned from persistence. More...
 
 buildContentInfoDomainObject (SPIContentInfo $spiContentInfo)
 Builds a ContentInfo domain object from value object returned from persistence. More...
 
 copyContent (ContentInfo $contentInfo, LocationCreateStruct $destinationLocationCreateStruct, APIVersionInfo $versionInfo=null)
 Copies the content to a new location. More...
 
 createContentDraft (ContentInfo $contentInfo, APIVersionInfo $versionInfo=null, User $creator=null)
 Creates a draft from a published or archived version. More...
 
 deleteContent (ContentInfo $contentInfo)
 Deletes a content object including all its versions and locations including their subtrees. More...
 
 deleteRelation (APIVersionInfo $sourceVersion, ContentInfo $destinationContent)
 Removes a relation of type COMMON from a draft. More...
 
 deleteVersion (APIVersionInfo $versionInfo)
 removes the given version More...
 
 internalLoadContent ($contentId, array $languages=null, $versionNo=null)
 Loads content in a version of the given content object. More...
 
 internalLoadContentInfo ($contentId)
 Loads a content info object. More...
 
 loadContent ($contentId, array $languages=null, $versionNo=null)
 Loads content in a version of the given content object. More...
 
 loadContentByContentInfo (ContentInfo $contentInfo, array $languages=null, $versionNo=null)
 Loads content in a version for the given content info object. More...
 
 loadContentByRemoteId ($remoteId, array $languages=null, $versionNo=null)
 Loads content in a version for the content object reference by the given remote id. More...
 
 loadContentByVersionInfo (APIVersionInfo $versionInfo, array $languages=null)
 Loads content in the version given by version info. More...
 
 loadContentDrafts (User $user=null)
 Loads drafts for a user. More...
 
 loadContentInfo ($contentId)
 Loads a content info object. More...
 
 loadContentInfoByRemoteId ($remoteId)
 Loads a content info object for the given remoteId. More...
 
 loadReverseRelations (ContentInfo $contentInfo)
 Loads all incoming relations for a content object. More...
 
 loadTranslationInfos (ContentInfo $contentInfo, array $filter=array())
 lists the translations done on this content object More...
 
 loadVersionInfo (ContentInfo $contentInfo, $versionNo=null)
 Loads a version info of the given content object. More...
 
 loadVersionInfoById ($contentId, $versionNo=null)
 Loads a version info of the given content object id. More...
 
 loadVersions (ContentInfo $contentInfo)
 Loads all versions for the given content. More...
 
 newContentCreateStruct (ContentType $contentType, $mainLanguageCode)
 Instantiates a new content create struct object. More...
 
 newContentMetadataUpdateStruct ()
 Instantiates a new content meta data update struct. More...
 
 newContentUpdateStruct ()
 Instantiates a new content update struct. More...
 
 newTranslationInfo ()
 Instantiates a new TranslationInfo object. More...
 
 newTranslationValues ()
 Instantiates a Translation object. More...
 
 publishVersion (APIVersionInfo $versionInfo)
 Publishes a content version. More...
 
 translateVersion (TranslationInfo $translationInfo, APITranslationValues $translationValues, User $modifier=null)
 
 updateContentMetadata (ContentInfo $contentInfo, ContentMetadataUpdateStruct $contentMetadataUpdateStruct)
 Updates the metadata. More...
 
- Public Member Functions inherited from eZ\Publish\API\Repository\ContentService
 addRelation (VersionInfo $sourceVersion, ContentInfo $destinationContent)
 Adds a relation of type common. More...
 
 copyContent (ContentInfo $contentInfo, LocationCreateStruct $destinationLocationCreateStruct, VersionInfo $versionInfo=null)
 Copies the content to a new location. More...
 
 createContent (ContentCreateStruct $contentCreateStruct, array $locationCreateStructs=array())
 Creates a new content draft assigned to the authenticated user. More...
 
 createContentDraft (ContentInfo $contentInfo, VersionInfo $versionInfo=null, User $creator=null)
 Creates a draft from a published or archived version. More...
 
 deleteRelation (VersionInfo $sourceVersion, ContentInfo $destinationContent)
 Removes a relation of type COMMON from a draft. More...
 
 deleteVersion (VersionInfo $versionInfo)
 removes the given version More...
 
 loadContentByVersionInfo (VersionInfo $versionInfo, array $languages=null)
 Loads content in the version given by version info. More...
 
 loadRelations (VersionInfo $versionInfo)
 Loads all outgoing relations for the given version. More...
 
 publishVersion (VersionInfo $versionInfo)
 Publishes a content version. More...
 
 translateVersion (TranslationInfo $translationInfo, TranslationValues $translationValues, User $modifier=null)
 
 updateContent (VersionInfo $versionInfo, ContentUpdateStruct $contentUpdateStruct)
 Updates the fields of a draft. More...
 

Protected Member Functions

 buildDomainFields (array $spiFields, ContentType $type=null)
 Returns an array of domain fields created from given array of SPI fields. More...
 
 buildRelationDomainObject (SPIRelation $spiRelation, ContentInfo $sourceContentInfo=null, ContentInfo $destinationContentInfo=null)
 Builds API Relation object from provided SPI Relation object. More...
 
 buildSPILocationCreateStructs (array $locationCreateStructs)
 Creates an array of SPI location create structs from given array of API location create structs. More...
 
 buildVersionInfoDomainObject (SPIVersionInfo $spiVersionInfo)
 Builds a VersionInfo domain object from value object returned from persistence. More...
 
 canUserPublishContent (APIContent $content)
 Returns true if user has a right to publish given previously unpublished $content, false otherwise. More...
 
 getDateTime ($timestamp)
 
 getDomainVersionStatus ($spiStatus)
 
 internalPublishVersion (APIVersionInfo $versionInfo, $publicationDate=null)
 Publishes a content version. More...
 
 publishUrlAliasesForContent (APIContent $content, $updatePathIdentificationString=true)
 Publishes URL aliases for all locations of a given content. More...
 

Protected Attributes

 $persistenceHandler
 
 $repository
 
 $settings
 

Constructor & Destructor Documentation

eZ\Publish\Core\Repository\ContentService::__construct ( RepositoryInterface  $repository,
Handler  $handler,
array  $settings = array() 
)

Setups service with reference to repository object that created it & corresponding handler.

Parameters
\eZ\Publish\API\Repository\Repository$repository
\eZ\Publish\SPI\Persistence\Handler$handler
array$settings

Member Function Documentation

eZ\Publish\Core\Repository\ContentService::addRelation ( APIVersionInfo  $sourceVersion,
ContentInfo  $destinationContent 
)

Adds a relation of type common.

The source of the relation is the content and version referenced by $versionInfo.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to edit this version
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionif the version is not a draft
Parameters
\eZ\Publish\API\Repository\Values\Content\VersionInfo$sourceVersion
\eZ\Publish\API\Repository\Values\Content\ContentInfo$destinationContentthe destination of the relation
Returns
the newly created relation
eZ\Publish\Core\Repository\ContentService::addTranslationInfo ( TranslationInfo  $translationInfo)
eZ\Publish\Core\Repository\ContentService::buildContentDomainObject ( SPIContent  $spiContent)

Builds a Content domain object from value object returned from persistence.

Todo:
: Made public, since the search service also needs access to this method. Should be refactored into its own class together with the other build* methods.
Parameters
\eZ\Publish\SPI\Persistence\Content$spiContent
Returns

Referenced by eZ\Publish\Core\Repository\ContentService\createContentDraft(), eZ\Publish\Core\Repository\ContentService\internalLoadContent(), and eZ\Publish\Core\Repository\ContentService\internalPublishVersion().

eZ\Publish\Core\Repository\ContentService::buildContentInfoDomainObject ( SPIContentInfo  $spiContentInfo)

Builds a ContentInfo domain object from value object returned from persistence.

Todo:
: Made public, since the search service also needs access to this method. Should be refactored into its own class together with the other build* methods.
Parameters
\eZ\Publish\SPI\Persistence\Content\ContentInfo$spiContentInfo
Returns

Referenced by eZ\Publish\Core\Repository\ContentService\buildVersionInfoDomainObject(), and eZ\Publish\Core\Repository\ContentService\internalLoadContentInfo().

eZ\Publish\Core\Repository\ContentService::buildDomainFields ( array  $spiFields,
ContentType  $type = null 
)
protected

Returns an array of domain fields created from given array of SPI fields.

Parameters
\eZ\Publish\SPI\Persistence\Content\Field[]$spiFields
Returns
array

Referenced by eZ\Publish\Core\Repository\ContentService\buildContentDomainObject().

eZ\Publish\Core\Repository\ContentService::buildRelationDomainObject ( SPIRelation  $spiRelation,
ContentInfo  $sourceContentInfo = null,
ContentInfo  $destinationContentInfo = null 
)
protected

Builds API Relation object from provided SPI Relation object.

Parameters
\eZ\Publish\SPI\Persistence\Content\Relation$spiRelation
\eZ\Publish\API\Repository\Values\Content\ContentInfo | null$sourceContentInfo
\eZ\Publish\API\Repository\Values\Content\ContentInfo | null$destinationContentInfo
Returns

Referenced by eZ\Publish\Core\Repository\ContentService\addRelation(), and eZ\Publish\Core\Repository\ContentService\loadReverseRelations().

eZ\Publish\Core\Repository\ContentService::buildSPILocationCreateStructs ( array  $locationCreateStructs)
protected

Creates an array of SPI location create structs from given array of API location create structs.

Exceptions
\eZ\Publish\Core\Base\Exceptions\InvalidArgumentException
Parameters
\eZ\Publish\API\Repository\Values\Content\LocationCreateStruct[]$locationCreateStructs
Returns
[]
eZ\Publish\Core\Repository\ContentService::buildVersionInfoDomainObject ( SPIVersionInfo  $spiVersionInfo)
protected

Builds a VersionInfo domain object from value object returned from persistence.

Parameters
\eZ\Publish\SPI\Persistence\Content\VersionInfo$spiVersionInfo
Returns
VersionInfo

Referenced by eZ\Publish\Core\Repository\ContentService\copyContent(), eZ\Publish\Core\Repository\ContentService\loadContentDrafts(), eZ\Publish\Core\Repository\ContentService\loadVersionInfoById(), and eZ\Publish\Core\Repository\ContentService\loadVersions().

eZ\Publish\Core\Repository\ContentService::canUserPublishContent ( APIContent  $content)
protected

Returns true if user has a right to publish given previously unpublished $content, false otherwise.

Parameters
APIContent$content
Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedException
Returns
boolean

Referenced by eZ\Publish\Core\Repository\ContentService\publishVersion().

eZ\Publish\Core\Repository\ContentService::copyContent ( ContentInfo  $contentInfo,
LocationCreateStruct  $destinationLocationCreateStruct,
APIVersionInfo  $versionInfo = null 
)

Copies the content to a new location.

If no version is given, all versions are copied, otherwise only the given version.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to copy the content to the given location
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
\eZ\Publish\API\Repository\Values\Content\LocationCreateStruct$destinationLocationCreateStructthe target location where the content is copied to
\eZ\Publish\API\Repository\Values\Content\VersionInfo$versionInfo
Returns
eZ\Publish\Core\Repository\ContentService::createContentDraft ( ContentInfo  $contentInfo,
APIVersionInfo  $versionInfo = null,
User  $creator = null 
)

Creates a draft from a published or archived version.

If no version is given, the current published version is used. 4.x: The draft is created with the initialLanguage code of the source version or if not present with the main language. It can be changed on updating the version.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the current-user is not allowed to create the draft
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
\eZ\Publish\API\Repository\Values\Content\VersionInfo$versionInfo
\eZ\Publish\API\Repository\Values\User\User$creatorif set given user is used to create the draft - otherwise the current-user is used
Returns
- the newly created content draft
eZ\Publish\Core\Repository\ContentService::deleteContent ( ContentInfo  $contentInfo)

Deletes a content object including all its versions and locations including their subtrees.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to delete the content (in one of the locations of the given content object)
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::deleteRelation ( APIVersionInfo  $sourceVersion,
ContentInfo  $destinationContent 
)

Removes a relation of type COMMON from a draft.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed edit this version
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionif the version is not a draft
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif there is no relation of type COMMON for the given destination
Parameters
\eZ\Publish\API\Repository\Values\Content\VersionInfo$sourceVersion
\eZ\Publish\API\Repository\Values\Content\ContentInfo$destinationContent
eZ\Publish\Core\Repository\ContentService::deleteVersion ( APIVersionInfo  $versionInfo)

removes the given version

Exceptions
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionif the version is in state published
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to remove this version
Parameters
\eZ\Publish\API\Repository\Values\Content\VersionInfo$versionInfo
eZ\Publish\Core\Repository\ContentService::getDateTime (   $timestamp)
protected
eZ\Publish\Core\Repository\ContentService::getDomainVersionStatus (   $spiStatus)
protected
Parameters
int$spiStatus
Returns
int|null

Referenced by eZ\Publish\Core\Repository\ContentService\buildVersionInfoDomainObject().

eZ\Publish\Core\Repository\ContentService::internalLoadContent (   $contentId,
array  $languages = null,
  $versionNo = null 
)

Loads content in a version of the given content object.

If no version number is given, the method returns the current version

private This is only available to services that needs access to Content w/o permissions checks

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the content or version with the given id and languages does not exist
Parameters
int$contentId
array | null$languagesA language filter for fields. If not given all languages are returned
int | null$versionNothe version number. If not given the current version is returned.
Returns

Referenced by eZ\Publish\Core\Repository\ContentService\loadContent(), eZ\Publish\Core\Repository\ContentService\loadContentByRemoteId(), and eZ\Publish\Core\Repository\ContentService\publishVersion().

eZ\Publish\Core\Repository\ContentService::internalLoadContentInfo (   $contentId)

Loads a content info object.

To load fields use loadContent

private This is only available to services that needs access to Content w/o permissions checks

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if the content with the given id does not exist
Parameters
int$contentId
Returns

Referenced by eZ\Publish\Core\Repository\ContentService\buildRelationDomainObject(), eZ\Publish\Core\Repository\ContentService\deleteContent(), and eZ\Publish\Core\Repository\ContentService\loadContentInfo().

eZ\Publish\Core\Repository\ContentService::internalPublishVersion ( APIVersionInfo  $versionInfo,
  $publicationDate = null 
)
protected

Publishes a content version.

Exceptions
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionif the version is not a draft
Parameters
\eZ\Publish\API\Repository\Values\Content\VersionInfo$versionInfo
int | null$publicationDate
Returns

Referenced by eZ\Publish\Core\Repository\ContentService\copyContent(), and eZ\Publish\Core\Repository\ContentService\publishVersion().

eZ\Publish\Core\Repository\ContentService::loadContent (   $contentId,
array  $languages = null,
  $versionNo = null 
)

Loads content in a version of the given content object.

If no version number is given, the method returns the current version

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the content or version with the given id and languages does not exist
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to load this version
Parameters
int$contentId
array | null$languagesA language filter for fields. If not given all languages are returned
int | null$versionNothe version number. If not given the current version is returned.
Returns

Implements eZ\Publish\API\Repository\ContentService.

Referenced by eZ\Publish\Core\Repository\ContentService\loadContentByContentInfo(), eZ\Publish\Core\Repository\ContentService\loadContentByVersionInfo(), and eZ\Publish\Core\Repository\ContentService\updateContentMetadata().

eZ\Publish\Core\Repository\ContentService::loadContentByContentInfo ( ContentInfo  $contentInfo,
array  $languages = null,
  $versionNo = null 
)

Loads content in a version for the given content info object.

If no version number is given, the method returns the current version

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if version with the given number does not exist
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to load this version
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
array$languagesA language filter for fields. If not given all languages are returned
int$versionNothe version number. If not given the current version is returned.
Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::loadContentByRemoteId (   $remoteId,
array  $languages = null,
  $versionNo = null 
)

Loads content in a version for the content object reference by the given remote id.

If no version is given, the method returns the current version

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if the content or version with the given remote id does not exist
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to load this version
Parameters
string$remoteId
array$languagesA language filter for fields. If not given all languages are returned
int$versionNothe version number. If not given the current version is returned.
Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::loadContentByVersionInfo ( APIVersionInfo  $versionInfo,
array  $languages = null 
)

Loads content in the version given by version info.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to load this version
Parameters
\eZ\Publish\API\Repository\Values\Content\VersionInfo$versionInfo
array$languagesA language filter for fields. If not given all languages are returned
Returns
eZ\Publish\Core\Repository\ContentService::loadContentDrafts ( User  $user = null)

Loads drafts for a user.

If no user is given the drafts for the authenticated user a returned

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the current-user is not allowed to load the draft list
Parameters
\eZ\Publish\API\Repository\Values\User\User$user
Returns
the drafts (VersionInfo) owned by the given user

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::loadContentInfo (   $contentId)

Loads a content info object.

To load fields use loadContent

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to read the content
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if the content with the given id does not exist
Parameters
int$contentId
Returns

Implements eZ\Publish\API\Repository\ContentService.

Referenced by eZ\Publish\Core\Repository\ContentService\createContentDraft(), eZ\Publish\Core\Repository\ContentService\loadVersionInfoById(), and eZ\Publish\Core\Repository\ContentService\updateContentMetadata().

eZ\Publish\Core\Repository\ContentService::loadContentInfoByRemoteId (   $remoteId)

Loads a content info object for the given remoteId.

To load fields use loadContent

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to read the content
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if the content with the given remote id does not exist
Parameters
string$remoteId
Returns

Implements eZ\Publish\API\Repository\ContentService.

Referenced by eZ\Publish\Core\Repository\ContentService\updateContentMetadata().

eZ\Publish\Core\Repository\ContentService::loadReverseRelations ( ContentInfo  $contentInfo)

Loads all incoming relations for a content object.

The relations come only from published versions of the source content objects

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to read this version
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
Returns
[]

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::loadTranslationInfos ( ContentInfo  $contentInfo,
array  $filter = array() 
)

lists the translations done on this content object

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed read translation infos
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
array$filter
Todo:
TBD - filter by source version destination version and languages
Returns
[]
Since
5.0

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::loadVersionInfo ( ContentInfo  $contentInfo,
  $versionNo = null 
)

Loads a version info of the given content object.

If no version number is given, the method returns the current version

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if the version with the given number does not exist
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to load this version
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
int$versionNothe version number. If not given the current version is returned.
Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::loadVersionInfoById (   $contentId,
  $versionNo = null 
)

Loads a version info of the given content object id.

If no version number is given, the method returns the current version

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException- if the version with the given number does not exist
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to load this version
Parameters
int$contentId
int$versionNothe version number. If not given the current version is returned.
Returns

Implements eZ\Publish\API\Repository\ContentService.

Referenced by eZ\Publish\Core\Repository\ContentService\addRelation(), eZ\Publish\Core\Repository\ContentService\createContentDraft(), eZ\Publish\Core\Repository\ContentService\deleteRelation(), and eZ\Publish\Core\Repository\ContentService\loadVersionInfo().

eZ\Publish\Core\Repository\ContentService::loadVersions ( ContentInfo  $contentInfo)

Loads all versions for the given content.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to list versions
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
Returns
[] Sorted by creation date

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::newContentCreateStruct ( ContentType  $contentType,
  $mainLanguageCode 
)

Instantiates a new content create struct object.

Parameters
\eZ\Publish\API\Repository\Values\ContentType\ContentType$contentType
string$mainLanguageCode
Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::newContentMetadataUpdateStruct ( )

Instantiates a new content meta data update struct.

Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::newContentUpdateStruct ( )

Instantiates a new content update struct.

Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::newTranslationInfo ( )

Instantiates a new TranslationInfo object.

Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::newTranslationValues ( )

Instantiates a Translation object.

Returns

Implements eZ\Publish\API\Repository\ContentService.

eZ\Publish\Core\Repository\ContentService::publishUrlAliasesForContent ( APIContent  $content,
  $updatePathIdentificationString = true 
)
protected

Publishes URL aliases for all locations of a given content.

Parameters
\eZ\Publish\API\Repository\Values\Content\Content$content
boolean$updatePathIdentificationStringthis parameter is legacy storage specific for updating ezcontentobject_tree.path_identification_string, it is ignored by other storage engines
Returns
void

Referenced by eZ\Publish\Core\Repository\ContentService\internalPublishVersion(), and eZ\Publish\Core\Repository\ContentService\updateContentMetadata().

eZ\Publish\Core\Repository\ContentService::publishVersion ( APIVersionInfo  $versionInfo)

Publishes a content version.

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to publish this version
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionif the version is not a draft
Parameters
\eZ\Publish\API\Repository\Values\Content\VersionInfo$versionInfo
Returns
eZ\Publish\Core\Repository\ContentService::translateVersion ( TranslationInfo  $translationInfo,
APITranslationValues  $translationValues,
User  $modifier = null 
)
eZ\Publish\Core\Repository\ContentService::updateContentMetadata ( ContentInfo  $contentInfo,
ContentMetadataUpdateStruct  $contentMetadataUpdateStruct 
)

Updates the metadata.

(see ContentMetadataUpdateStruct) of a content object - to update fields use updateContent

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to update the content meta data
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif the remoteId in $contentMetadataUpdateStruct is set but already exists
Parameters
\eZ\Publish\API\Repository\Values\Content\ContentInfo$contentInfo
\eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct$contentMetadataUpdateStruct
Returns
the content with the updated attributes

Implements eZ\Publish\API\Repository\ContentService.

Member Data Documentation

eZ\Publish\Core\Repository\ContentService::$persistenceHandler
protected
eZ\Publish\Core\Repository\ContentService::$repository
protected
eZ\Publish\Core\Repository\ContentService::$settings
protected

The documentation for this class was generated from the following file: