PHP Class eZ\Publish\Core\Repository\ContentService

Inheritance: implements eZ\Publish\API\Repository\ContentService
Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$domainMapper eZ\Publish\Core\Repository\Helper\DomainMapper
$fieldTypeRegistry eZ\Publish\Core\Repository\Helper\FieldTypeRegistry
$nameSchemaService eZ\Publish\Core\Repository\Helper\NameSchemaService
$persistenceHandler eZ\Publish\SPI\Persistence\Handler
$relationProcessor eZ\Publish\Core\Repository\Helper\RelationProcessor
$repository Repository
$settings array

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Handler $handler, DomainMapper $domainMapper, RelationProcessor $relationProcessor, NameSchemaService $nameSchemaService, FieldTypeRegistry $fieldTypeRegistry, array $settings = [] ) Setups service with reference to repository object that created it & corresponding handler.
addRelation ( eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion, eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent ) : eZ\Publish\API\Repository\Values\Content\Relation Adds a relation of type common.
addTranslationInfo ( eZ\Publish\API\Repository\Values\Content\TranslationInfo $translationInfo ) Adds translation information to the content object.
copyContent ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\LocationCreateStruct $destinationLocationCreateStruct, eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo = null ) : eZ\Publish\API\Repository\Values\Content\Content Copies the content to a new location. If no version is given, all versions are copied, otherwise only the given version.
createContent ( eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct, array $locationCreateStructs = [] ) : eZ\Publish\API\Repository\Values\Content\Content Creates a new content draft assigned to the authenticated user.
createContentDraft ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo = null, eZ\Publish\API\Repository\Values\User\User $creator = null ) : eZ\Publish\API\Repository\Values\Content\Content Creates a draft from a published or archived version.
deleteContent ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : mixed[] Deletes a content object including all its versions and locations including their subtrees.
deleteRelation ( eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion, eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent ) Removes a relation of type COMMON from a draft.
deleteVersion ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo ) Removes the given version.
internalLoadContent ( mixed $id, array $languages = null, integer | null $versionNo = null, boolean $isRemoteId = false, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content Loads content in a version of the given content object.
internalLoadContentInfo ( mixed $id, boolean $isRemoteId = false ) : eZ\Publish\API\Repository\Values\Content\ContentInfo Loads a content info object.
loadContent ( integer $contentId, array $languages = null, integer | null $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content Loads content in a version of the given content object.
loadContentByContentInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, array $languages = null, integer $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content Loads content in a version for the given content info object.
loadContentByRemoteId ( string $remoteId, array $languages = null, integer $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content Loads content in a version for the content object reference by the given remote id.
loadContentByVersionInfo ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, array $languages = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content Loads content in the version given by version info.
loadContentDrafts ( eZ\Publish\API\Repository\Values\User\User $user = null ) : eZ\Publish\API\Repository\Values\Content\VersionInfo Loads drafts for a user.
loadContentInfo ( integer $contentId ) : eZ\Publish\API\Repository\Values\Content\ContentInfo Loads a content info object.
loadContentInfoByRemoteId ( string $remoteId ) : eZ\Publish\API\Repository\Values\Content\ContentInfo Loads a content info object for the given remoteId.
loadRelations ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Relation[] Loads all outgoing relations for the given version.
loadReverseRelations ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : eZ\Publish\API\Repository\Values\Content\Relation[] Loads all incoming relations for a content object.
loadTranslationInfos ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, array $filter = [] ) : eZ\Publish\API\Repository\Values\Content\TranslationInfo[] lists the translations done on this content object.
loadVersionInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, integer $versionNo = null ) : eZ\Publish\API\Repository\Values\Content\VersionInfo Loads a version info of the given content object.
loadVersionInfoById ( mixed $contentId, integer $versionNo = null ) : eZ\Publish\API\Repository\Values\Content\VersionInfo Loads a version info of the given content object id.
loadVersions ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : eZ\Publish\API\Repository\Values\Content\VersionInfo[] Loads all versions for the given content.
newContentCreateStruct ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $mainLanguageCode ) : eZ\Publish\API\Repository\Values\Content\ContentCreateStruct Instantiates a new content create struct object.
newContentMetadataUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct Instantiates a new content meta data update struct.
newContentUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct Instantiates a new content update struct.
newTranslationInfo ( ) : eZ\Publish\API\Repository\Values\Content\TranslationInfo Instantiates a new TranslationInfo object.
newTranslationValues ( ) : eZ\Publish\API\Repository\Values\Content\TranslationValues Instantiates a Translation object.
publishVersion ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Content Publishes a content version.
translateVersion ( eZ\Publish\API\Repository\Values\Content\TranslationInfo $translationInfo, eZ\Publish\API\Repository\Values\Content\TranslationValues $translationValues, eZ\Publish\API\Repository\Values\User\User $modifier = null ) : eZ\Publish\API\Repository\Values\Content\Content Translate a version.
updateContent ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Content Updates the fields of a draft.
updateContentMetadata ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct $contentMetadataUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Content Updates the metadata.

Protected Methods

Method Description
buildSPILocationCreateStructs ( array $locationCreateStructs ) : eZ\Publish\SPI\Persistence\Content\Location\CreateStruct[]
getDefaultObjectStates ( ) : eZ\Publish\SPI\Persistence\Content\ObjectState[] Returns an array of default content states with content state group id as key.
getLanguageCodesForCreate ( eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct ) : string[] Returns all language codes used in given $fields.
getLanguageCodesForUpdate ( eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct, eZ\Publish\API\Repository\Values\Content\Content $content ) : array Returns all language codes used in given $fields.
internalPublishVersion ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, integer | null $publicationDate = null ) : eZ\Publish\API\Repository\Values\Content\Content Publishes a content version.
mapFieldsForCreate ( eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct ) : array Returns an array of fields like $fields[$field->fieldDefIdentifier][$field->languageCode].
mapFieldsForUpdate ( eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $mainLanguageCode ) : array Returns an array of fields like $fields[$field->fieldDefIdentifier][$field->languageCode].
publishUrlAliasesForContent ( eZ\Publish\API\Repository\Values\Content\Content $content, boolean $updatePathIdentificationString = true ) Publishes URL aliases for all locations of a given content.

Private Methods

Method Description
cloneField ( eZ\Publish\API\Repository\Values\Content\Field $field, array $overrides = [] ) : eZ\Publish\API\Repository\Values\Content\Field Clones $field with overriding specific properties from given $overrides array.

Method Details

__construct() public method

Setups service with reference to repository object that created it & corresponding handler.
public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Handler $handler, DomainMapper $domainMapper, RelationProcessor $relationProcessor, NameSchemaService $nameSchemaService, FieldTypeRegistry $fieldTypeRegistry, array $settings = [] )
$repository eZ\Publish\API\Repository\Repository
$handler eZ\Publish\SPI\Persistence\Handler
$domainMapper eZ\Publish\Core\Repository\Helper\DomainMapper
$relationProcessor eZ\Publish\Core\Repository\Helper\RelationProcessor
$nameSchemaService eZ\Publish\Core\Repository\Helper\NameSchemaService
$fieldTypeRegistry eZ\Publish\Core\Repository\Helper\FieldTypeRegistry
$settings array

addRelation() public method

The source of the relation is the content and version referenced by $versionInfo.
public addRelation ( eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion, eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent ) : eZ\Publish\API\Repository\Values\Content\Relation
$sourceVersion eZ\Publish\API\Repository\Values\Content\VersionInfo
$destinationContent eZ\Publish\API\Repository\Values\Content\ContentInfo the destination of the relation
return eZ\Publish\API\Repository\Values\Content\Relation the newly created relation

addTranslationInfo() public method

Adds translation information to the content object.
Since: 5.0
public addTranslationInfo ( eZ\Publish\API\Repository\Values\Content\TranslationInfo $translationInfo )
$translationInfo eZ\Publish\API\Repository\Values\Content\TranslationInfo

buildSPILocationCreateStructs() protected method

protected buildSPILocationCreateStructs ( array $locationCreateStructs ) : eZ\Publish\SPI\Persistence\Content\Location\CreateStruct[]
$locationCreateStructs array
return eZ\Publish\SPI\Persistence\Content\Location\CreateStruct[]

copyContent() public method

Copies the content to a new location. If no version is given, all versions are copied, otherwise only the given version.
public copyContent ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\LocationCreateStruct $destinationLocationCreateStruct, eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo = null ) : eZ\Publish\API\Repository\Values\Content\Content
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$destinationLocationCreateStruct eZ\Publish\API\Repository\Values\Content\LocationCreateStruct the target location where the content is copied to
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
return eZ\Publish\API\Repository\Values\Content\Content

createContent() public method

If a different userId is given in $contentCreateStruct it is assigned to the given user but this required special rights for the authenticated user (this is useful for content staging where the transfer process does not have to authenticate with the user which created the content object in the source server). The user has to publish the draft if it should be visible. In 4.x at least one location has to be provided in the location creation array.
public createContent ( eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct, array $locationCreateStructs = [] ) : eZ\Publish\API\Repository\Values\Content\Content
$contentCreateStruct eZ\Publish\API\Repository\Values\Content\ContentCreateStruct
$locationCreateStructs array For each location parent under which a location should be created for the content
return eZ\Publish\API\Repository\Values\Content\Content - the newly created content draft

createContentDraft() public method

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.
public createContentDraft ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo = null, eZ\Publish\API\Repository\Values\User\User $creator = null ) : eZ\Publish\API\Repository\Values\Content\Content
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
$creator eZ\Publish\API\Repository\Values\User\User if set given user is used to create the draft - otherwise the current-user is used
return eZ\Publish\API\Repository\Values\Content\Content - the newly created content draft

deleteContent() public method

Deletes a content object including all its versions and locations including their subtrees.
public deleteContent ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : mixed[]
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
return mixed[] Affected Location Id's

deleteRelation() public method

Removes a relation of type COMMON from a draft.
public deleteRelation ( eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion, eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent )
$sourceVersion eZ\Publish\API\Repository\Values\Content\VersionInfo
$destinationContent eZ\Publish\API\Repository\Values\Content\ContentInfo

deleteVersion() public method

Removes the given version.
public deleteVersion ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo )
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo

getDefaultObjectStates() protected method

Returns an array of default content states with content state group id as key.
protected getDefaultObjectStates ( ) : eZ\Publish\SPI\Persistence\Content\ObjectState[]
return eZ\Publish\SPI\Persistence\Content\ObjectState[]

getLanguageCodesForCreate() protected method

Returns all language codes used in given $fields.
protected getLanguageCodesForCreate ( eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct ) : string[]
$contentCreateStruct eZ\Publish\API\Repository\Values\Content\ContentCreateStruct
return string[]

getLanguageCodesForUpdate() protected method

Returns all language codes used in given $fields.
protected getLanguageCodesForUpdate ( eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct, eZ\Publish\API\Repository\Values\Content\Content $content ) : array
$contentUpdateStruct eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct
$content eZ\Publish\API\Repository\Values\Content\Content
return array

internalLoadContent() public method

If no version number is given, the method returns the current version
public internalLoadContent ( mixed $id, array $languages = null, integer | null $versionNo = null, boolean $isRemoteId = false, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content
$id mixed
$languages array A language filter for fields. If not given all languages are returned
$versionNo integer | null the version number. If not given the current version is returned
$isRemoteId boolean
$useAlwaysAvailable boolean Add Main language to \$languages if true (default) and if alwaysAvailable is true
return eZ\Publish\API\Repository\Values\Content\Content

internalLoadContentInfo() public method

To load fields use loadContent
public internalLoadContentInfo ( mixed $id, boolean $isRemoteId = false ) : eZ\Publish\API\Repository\Values\Content\ContentInfo
$id mixed
$isRemoteId boolean
return eZ\Publish\API\Repository\Values\Content\ContentInfo

internalPublishVersion() protected method

Publishes a content version.
protected internalPublishVersion ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, integer | null $publicationDate = null ) : eZ\Publish\API\Repository\Values\Content\Content
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
$publicationDate integer | null If null existing date is kept if there is one, otherwise current time is used.
return eZ\Publish\API\Repository\Values\Content\Content

loadContent() public method

If no version number is given, the method returns the current version
public loadContent ( integer $contentId, array $languages = null, integer | null $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content
$contentId integer
$languages array A language filter for fields. If not given all languages are returned
$versionNo integer | null the version number. If not given the current version is returned
$useAlwaysAvailable boolean Add Main language to \$languages if true (default) and if alwaysAvailable is true
return eZ\Publish\API\Repository\Values\Content\Content

loadContentByContentInfo() public method

If no version number is given, the method returns the current version
public loadContentByContentInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, array $languages = null, integer $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$languages array A language filter for fields. If not given all languages are returned
$versionNo integer the version number. If not given the current version is returned
$useAlwaysAvailable boolean Add Main language to \$languages if true (default) and if alwaysAvailable is true
return eZ\Publish\API\Repository\Values\Content\Content

loadContentByRemoteId() public method

If no version is given, the method returns the current version
public loadContentByRemoteId ( string $remoteId, array $languages = null, integer $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content
$remoteId string
$languages array A language filter for fields. If not given all languages are returned
$versionNo integer the version number. If not given the current version is returned
$useAlwaysAvailable boolean Add Main language to \$languages if true (default) and if alwaysAvailable is true
return eZ\Publish\API\Repository\Values\Content\Content

loadContentByVersionInfo() public method

Loads content in the version given by version info.
public loadContentByVersionInfo ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, array $languages = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
$languages array A language filter for fields. If not given all languages are returned
$useAlwaysAvailable boolean Add Main language to \$languages if true (default) and if alwaysAvailable is true
return eZ\Publish\API\Repository\Values\Content\Content

loadContentDrafts() public method

If no user is given the drafts for the authenticated user a returned
public loadContentDrafts ( eZ\Publish\API\Repository\Values\User\User $user = null ) : eZ\Publish\API\Repository\Values\Content\VersionInfo
$user eZ\Publish\API\Repository\Values\User\User
return eZ\Publish\API\Repository\Values\Content\VersionInfo the drafts ({@link VersionInfo}) owned by the given user

loadContentInfo() public method

To load fields use loadContent
public loadContentInfo ( integer $contentId ) : eZ\Publish\API\Repository\Values\Content\ContentInfo
$contentId integer
return eZ\Publish\API\Repository\Values\Content\ContentInfo

loadContentInfoByRemoteId() public method

To load fields use loadContent
public loadContentInfoByRemoteId ( string $remoteId ) : eZ\Publish\API\Repository\Values\Content\ContentInfo
$remoteId string
return eZ\Publish\API\Repository\Values\Content\ContentInfo

loadRelations() public method

Loads all outgoing relations for the given version.
public loadRelations ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Relation[]
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
return eZ\Publish\API\Repository\Values\Content\Relation[]

loadReverseRelations() public method

The relations come only from published versions of the source content objects
public loadReverseRelations ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : eZ\Publish\API\Repository\Values\Content\Relation[]
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
return eZ\Publish\API\Repository\Values\Content\Relation[]

loadTranslationInfos() public method

lists the translations done on this content object.
Since: 5.0
public loadTranslationInfos ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, array $filter = [] ) : eZ\Publish\API\Repository\Values\Content\TranslationInfo[]
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$filter array
return eZ\Publish\API\Repository\Values\Content\TranslationInfo[]

loadVersionInfo() public method

If no version number is given, the method returns the current version
public loadVersionInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, integer $versionNo = null ) : eZ\Publish\API\Repository\Values\Content\VersionInfo
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$versionNo integer the version number. If not given the current version is returned.
return eZ\Publish\API\Repository\Values\Content\VersionInfo

loadVersionInfoById() public method

If no version number is given, the method returns the current version
public loadVersionInfoById ( mixed $contentId, integer $versionNo = null ) : eZ\Publish\API\Repository\Values\Content\VersionInfo
$contentId mixed
$versionNo integer the version number. If not given the current version is returned.
return eZ\Publish\API\Repository\Values\Content\VersionInfo

loadVersions() public method

Loads all versions for the given content.
public loadVersions ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : eZ\Publish\API\Repository\Values\Content\VersionInfo[]
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
return eZ\Publish\API\Repository\Values\Content\VersionInfo[] Sorted by creation date

mapFieldsForCreate() protected method

Returns an array of fields like $fields[$field->fieldDefIdentifier][$field->languageCode].
protected mapFieldsForCreate ( eZ\Publish\API\Repository\Values\Content\ContentCreateStruct $contentCreateStruct ) : array
$contentCreateStruct eZ\Publish\API\Repository\Values\Content\ContentCreateStruct
return array

mapFieldsForUpdate() protected method

Returns an array of fields like $fields[$field->fieldDefIdentifier][$field->languageCode].
protected mapFieldsForUpdate ( eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $mainLanguageCode ) : array
$contentUpdateStruct eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType
$mainLanguageCode string
return array

newContentCreateStruct() public method

Instantiates a new content create struct object.
public newContentCreateStruct ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $mainLanguageCode ) : eZ\Publish\API\Repository\Values\Content\ContentCreateStruct
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType
$mainLanguageCode string
return eZ\Publish\API\Repository\Values\Content\ContentCreateStruct

newContentMetadataUpdateStruct() public method

Instantiates a new content meta data update struct.
public newContentMetadataUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct
return eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct

newContentUpdateStruct() public method

Instantiates a new content update struct.
public newContentUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct
return eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct

newTranslationInfo() public method

Instantiates a new TranslationInfo object.
public newTranslationInfo ( ) : eZ\Publish\API\Repository\Values\Content\TranslationInfo
return eZ\Publish\API\Repository\Values\Content\TranslationInfo

newTranslationValues() public method

Instantiates a Translation object.
public newTranslationValues ( ) : eZ\Publish\API\Repository\Values\Content\TranslationValues
return eZ\Publish\API\Repository\Values\Content\TranslationValues

publishUrlAliasesForContent() protected method

Publishes URL aliases for all locations of a given content.
protected publishUrlAliasesForContent ( eZ\Publish\API\Repository\Values\Content\Content $content, boolean $updatePathIdentificationString = true )
$content eZ\Publish\API\Repository\Values\Content\Content
$updatePathIdentificationString boolean this parameter is legacy storage specific for updating ezcontentobject_tree.path_identification_string, it is ignored by other storage engines

publishVersion() public method

Publishes a content version.
public publishVersion ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Content
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
return eZ\Publish\API\Repository\Values\Content\Content

translateVersion() public method

updates the destination version given in $translationInfo with the provided translated fields in $translationValues
Since: 5.0
public translateVersion ( eZ\Publish\API\Repository\Values\Content\TranslationInfo $translationInfo, eZ\Publish\API\Repository\Values\Content\TranslationValues $translationValues, eZ\Publish\API\Repository\Values\User\User $modifier = null ) : eZ\Publish\API\Repository\Values\Content\Content
$translationInfo eZ\Publish\API\Repository\Values\Content\TranslationInfo
$translationValues eZ\Publish\API\Repository\Values\Content\TranslationValues
$modifier eZ\Publish\API\Repository\Values\User\User If set, this user is taken as modifier of the version
return eZ\Publish\API\Repository\Values\Content\Content the content draft with the translated fields

updateContent() public method

Updates the fields of a draft.
public updateContent ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Content
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
$contentUpdateStruct eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct
return eZ\Publish\API\Repository\Values\Content\Content the content draft with the updated fields

updateContentMetadata() public method

(see {@link ContentMetadataUpdateStruct}) of a content object - to update fields use updateContent
public updateContentMetadata ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct $contentMetadataUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Content
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$contentMetadataUpdateStruct eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct
return eZ\Publish\API\Repository\Values\Content\Content the content with the updated attributes

Property Details

$domainMapper protected_oe property

protected DomainMapper,eZ\Publish\Core\Repository\Helper $domainMapper
return eZ\Publish\Core\Repository\Helper\DomainMapper

$fieldTypeRegistry protected_oe property

protected FieldTypeRegistry,eZ\Publish\Core\Repository\Helper $fieldTypeRegistry
return eZ\Publish\Core\Repository\Helper\FieldTypeRegistry

$nameSchemaService protected_oe property

protected NameSchemaService,eZ\Publish\Core\Repository\Helper $nameSchemaService
return eZ\Publish\Core\Repository\Helper\NameSchemaService

$persistenceHandler protected_oe property

protected Handler,eZ\Publish\SPI\Persistence $persistenceHandler
return eZ\Publish\SPI\Persistence\Handler

$relationProcessor protected_oe property

protected RelationProcessor,eZ\Publish\Core\Repository\Helper $relationProcessor
return eZ\Publish\Core\Repository\Helper\RelationProcessor

$repository protected_oe property

protected Repository,eZ\Publish\Core\Repository $repository
return Repository

$settings protected_oe property

protected array $settings
return array