Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | List of all members
eZ\Publish\API\Repository\ContentService Interface Reference
Inheritance diagram for eZ\Publish\API\Repository\ContentService:

## Public Member Functions
| loadContentInfo ($contentId)
| Loads a content info object. More...
| loadContentInfoList (array $contentIds)
| Bulk-load ContentInfo items by id's. More...
| loadContentInfoByRemoteId ($remoteId)
| Loads a content info object for the given remoteId. 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...
| loadContentByContentInfo (ContentInfo $contentInfo, array $languages=null, $versionNo=null, $useAlwaysAvailable=true)
| Loads content in a version for the given content info object. More...
| loadContentByVersionInfo (VersionInfo $versionInfo, array $languages=null, $useAlwaysAvailable=true)
| Loads content in the version given by version info. More...
| loadContent ($contentId, array $languages=null, $versionNo=null, $useAlwaysAvailable=true)
| Loads content in a version of the given content object. More...
| loadContentByRemoteId ($remoteId, array $languages=null, $versionNo=null, $useAlwaysAvailable=true)
| Loads content in a version for the content object reference by the given remote id. More...
| loadContentListByContentInfo (array $contentInfoList, array $languages=[], $useAlwaysAvailable=true)
| Bulk-load Content items by the list of ContentInfo Value Objects. More...
| createContent (ContentCreateStruct $contentCreateStruct, array $locationCreateStructs=[])
| Creates a new content draft assigned to the authenticated user. More...
| updateContentMetadata (ContentInfo $contentInfo, ContentMetadataUpdateStruct $contentMetadataUpdateStruct)
| Updates the metadata. More...
| deleteContent (ContentInfo $contentInfo)
| Deletes a content object including all its versions and locations including their subtrees. More...
| createContentDraft (ContentInfo $contentInfo, VersionInfo $versionInfo=null, User $creator=null, ?Language $language=null)
| Creates a draft from a published or archived version. More...
| countContentDrafts (?User $user=null)
| Counts drafts for a user. More...
| loadContentDrafts (User $user=null)
| Loads drafts for a user. More...
| loadContentDraftList (?User $user=null, int $offset=0, int $limit=-1)
| Loads drafts for a user when content is not in the trash. More...
| updateContent (VersionInfo $versionInfo, ContentUpdateStruct $contentUpdateStruct)
| Updates the fields of a draft. More...
| publishVersion (VersionInfo $versionInfo, array $translations=Language::ALL)
| Publishes a content version. More...
| deleteVersion (VersionInfo $versionInfo)
| Removes the given version. More...
| loadVersions (ContentInfo $contentInfo, ?int $status=null)
| Loads all versions for the given content. More...
| copyContent (ContentInfo $contentInfo, LocationCreateStruct $destinationLocationCreateStruct, VersionInfo $versionInfo=null)
| Copies the content to a new location. More...
| loadRelations (VersionInfo $versionInfo)
| Loads all outgoing relations for the given version. More...
| countReverseRelations (ContentInfo $contentInfo)
| Counts all incoming relations for the given content object. More...
| loadReverseRelations (ContentInfo $contentInfo)
| Loads all incoming relations for a content object. More...
| loadReverseRelationList (ContentInfo $contentInfo, int $offset=0, int $limit=-1)
| Loads all incoming relations for a content object. More...
| addRelation (VersionInfo $sourceVersion, ContentInfo $destinationContent)
| Adds a relation of type common. More...
| deleteRelation (VersionInfo $sourceVersion, ContentInfo $destinationContent)
| Removes a relation of type COMMON from a draft. More...
| removeTranslation (ContentInfo $contentInfo, $languageCode)
| Remove Content Object translation from all Versions (including archived ones) of a Content Object. More...
| deleteTranslation (ContentInfo $contentInfo, $languageCode)
| Delete Content item Translation from all Versions (including archived ones) of a Content Object. More...
| deleteTranslationFromDraft (VersionInfo $versionInfo, $languageCode)
| Delete specified Translation from a Content Draft. More...
| hideContent (ContentInfo $contentInfo)
| Hides Content by making all the Locations appear hidden. More...
| revealContent (ContentInfo $contentInfo)
| Reveals Content hidden by hideContent API. 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...

## Detailed Description

Definition at line 26 of file API/Repository/ContentService.php.

## Member Function Documentation

## ◆ addRelation()

eZ\Publish\API\Repository\ContentService::addRelation | ( | VersionInfo | $sourceVersion,
|  | ContentInfo | $destinationContent
| ) |  |

Adds a relation of type common.

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

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ copyContent()

eZ\Publish\API\Repository\ContentService::copyContent | ( | ContentInfo | $contentInfo,
|  | LocationCreateStruct | $destinationLocationCreateStruct,
|  | VersionInfo | $versionInfo = `null`
| ) |  |

Copies the content to a new location.

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

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ countContentDrafts()

eZ\Publish\API\Repository\ContentService::countContentDrafts | ( | ?User | $user = `null` | ) |

Counts drafts for a user.

If no user is given the number of drafts for the authenticated user are returned

Parameters

  \eZ\Publish\API\Repository\Values\User\User | $user | The user to load drafts for, if defined, otherwise drafts for current-user

Returns
  int The number of drafts (VersionInfo) owned by the given user

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ countReverseRelations()

eZ\Publish\API\Repository\ContentService::countReverseRelations | ( | ContentInfo | $contentInfo | ) |

Counts all incoming relations for the given content object.

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo | $contentInfo |

Returns
  int The number of reverse relations (Relation)

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ createContent()

eZ\Publish\API\Repository\ContentService::createContent | ( | ContentCreateStruct | $contentCreateStruct,
|  | array | $locationCreateStructs = `[]`
| ) |  |

Creates a new content draft assigned to the authenticated user.

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.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ createContentDraft()

eZ\Publish\API\Repository\ContentService::createContentDraft | ( | ContentInfo | $contentInfo,
|  | VersionInfo | $versionInfo = `null`,
|  | User | $creator = `null`,
|  | ?Language | $language = `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

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ deleteContent()

eZ\Publish\API\Repository\ContentService::deleteContent | ( | ContentInfo | $contentInfo | ) |

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

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ deleteRelation()

eZ\Publish\API\Repository\ContentService::deleteRelation | ( | VersionInfo | $sourceVersion,
|  | ContentInfo | $destinationContent
| ) |  |

Removes a relation of type COMMON from a draft.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ deleteTranslation()

eZ\Publish\API\Repository\ContentService::deleteTranslation | ( | ContentInfo | $contentInfo,
|  |  | $languageCode
| ) |  |

Delete Content item Translation from all Versions (including archived ones) of a Content Object.

NOTE: this operation is risky and permanent, so user interface should provide a warning before performing it.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ deleteTranslationFromDraft()

eZ\Publish\API\Repository\ContentService::deleteTranslationFromDraft | ( | VersionInfo | $versionInfo,
|  |  | $languageCode
| ) |  |

Delete specified Translation from a Content Draft.

When using together with ContentService::publishVersion() method, make sure to not provide deleted translation in translations array, as it is going to be copied again from published version.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ deleteVersion()

eZ\Publish\API\Repository\ContentService::deleteVersion | ( | VersionInfo | $versionInfo | ) |

Removes the given version.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ hideContent()

eZ\Publish\API\Repository\ContentService::hideContent | ( | ContentInfo | $contentInfo | ) |

Hides Content by making all the Locations appear hidden.

It does not persist hidden state on Location object itself.

Content hidden by this API can be revealed by revealContent API.

See also
  revealContent

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo | $contentInfo |

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadContent()

eZ\Publish\API\Repository\ContentService::loadContent | ( |  | $contentId,
|  | array | $languages = `null`,
|  |  | $versionNo = `null`,
|  |  | $useAlwaysAvailable = `true`
| ) |  |

Loads content in a version of the given content object.

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

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ loadContentByContentInfo()

eZ\Publish\API\Repository\ContentService::loadContentByContentInfo | ( | ContentInfo | $contentInfo,
|  | array | $languages = `null`,
|  |  | $versionNo = `null`,
|  |  | $useAlwaysAvailable = `true`
| ) |  |

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

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

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ loadContentByRemoteId()

eZ\Publish\API\Repository\ContentService::loadContentByRemoteId | ( |  | $remoteId,
|  | array | $languages = `null`,
|  |  | $versionNo = `null`,
|  |  | $useAlwaysAvailable = `true`
| ) |  |

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

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ loadContentByVersionInfo()

eZ\Publish\API\Repository\ContentService::loadContentByVersionInfo | ( | VersionInfo | $versionInfo,
|  | array | $languages = `null`,
|  |  | $useAlwaysAvailable = `true`
| ) |  |

Loads content in the version given by version info.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ loadContentDraftList()

eZ\Publish\API\Repository\ContentService::loadContentDraftList | ( | ?User | $user = `null`,
|  | int | $offset = `0`,
|  | int | $limit = `-1`
| ) |  |

Loads drafts for a user when content is not in the trash.

The list is sorted by modification date.

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

Since
  7.5.5

Parameters

  \eZ\Publish\API\Repository\Values\User\User | null | $user | The user to load drafts for, if defined, otherwise drafts for current-user
  int | $offset |
  int | $limit |

Returns
  \eZ\Publish\API\Repository\Values\Content\ContentDraftList

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadContentDrafts()

eZ\Publish\API\Repository\ContentService::loadContentDrafts | ( | User | $user = `null` | ) |

Loads drafts for a user.

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

Deprecated:
  Please use {

See also
  loadContentDraftList()} instead to avoid risking loading too much data.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadContentInfo()

eZ\Publish\API\Repository\ContentService::loadContentInfo | ( |  | $contentId | ) |

Loads a content info object.

To load fields use loadContent

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadContentInfoByRemoteId()

eZ\Publish\API\Repository\ContentService::loadContentInfoByRemoteId | ( |  | $remoteId | ) |

Loads a content info object for the given remoteId.

To load fields use loadContent

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadContentInfoList()

eZ\Publish\API\Repository\ContentService::loadContentInfoList | ( | array | $contentIds | ) |

Bulk-load ContentInfo items by id's.

Note: It does not throw exceptions on load, just skips erroneous (NotFound or Unauthorized) ContentInfo items.

Parameters

  int[] | $contentIds |

Returns
  \eZ\Publish\API\Repository\Values\Content\ContentInfo[] list of ContentInfo with Content Ids as keys

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadContentListByContentInfo()

eZ\Publish\API\Repository\ContentService::loadContentListByContentInfo | ( | array | $contentInfoList,
|  | array | $languages = `[]`,
|  |  | $useAlwaysAvailable = `true`
| ) |  |

Bulk-load Content items by the list of ContentInfo Value Objects.

Note: it does not throw exceptions on load, just ignores erroneous Content item. Moreover, since the method works on pre-loaded ContentInfo list, it is assumed that user is allowed to access every Content on the list.

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo[] | $contentInfoList |
  string[] | $languages | A language priority, filters returned fields and is used as prioritized language code on returned value object. If not given all languages are returned.
  bool | $useAlwaysAvailable | Add Main language to $languages if true (default) and if alwaysAvailable is true, unless all languages have been asked for.

Returns
  \eZ\Publish\API\Repository\Values\Content\Content[] list of Content items with Content Ids as keys

Implemented in eZ\Publish\Core\Repository\SiteAccessAware\ContentService, eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadRelations()

eZ\Publish\API\Repository\ContentService::loadRelations | ( | VersionInfo | $versionInfo | ) |

Loads all outgoing relations for the given version.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ loadReverseRelationList()

eZ\Publish\API\Repository\ContentService::loadReverseRelationList | ( | ContentInfo | $contentInfo,
|  | int | $offset = `0`,
|  | int | $limit = `-1`
| ) |  |

Loads all incoming relations for a content object.

The relations come only from published versions of the source content objects. If the user is not allowed to read specific version then UnauthorizedRelationListItem is returned \eZ\Publish\API\Repository\Values\Content\RelationList\Item\UnauthorizedRelationListItem

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo | $contentInfo |
  int | $offset |
  int | $limit |

Returns
  \eZ\Publish\API\Repository\Values\Content\RelationList

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadReverseRelations()

eZ\Publish\API\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

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadVersionInfo()

eZ\Publish\API\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

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadVersionInfoById()

eZ\Publish\API\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

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ loadVersions()

eZ\Publish\API\Repository\ContentService::loadVersions | ( | ContentInfo | $contentInfo,
|  | ?int | $status = `null`
| ) |  |

Loads all versions for the given content.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ newContentCreateStruct()

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

Instantiates a new content create struct object.

alwaysAvailable is set to the ContentType's defaultAlwaysAvailable

Parameters

  \eZ\Publish\API\Repository\Values\ContentType\ContentType | $contentType |
  string | $mainLanguageCode |

Returns
  \eZ\Publish\API\Repository\Values\Content\ContentCreateStruct

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ newContentMetadataUpdateStruct()

eZ\Publish\API\Repository\ContentService::newContentMetadataUpdateStruct | ( |  | ) |

Instantiates a new content meta data update struct.

Returns
  \eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ newContentUpdateStruct()

eZ\Publish\API\Repository\ContentService::newContentUpdateStruct | ( |  | ) |

Instantiates a new content update struct.

Returns
  \eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ publishVersion()

eZ\Publish\API\Repository\ContentService::publishVersion | ( | VersionInfo | $versionInfo,
|  | array | $translations = `Language::ALL`
| ) |  |

Publishes a content version.

Publishes a content version and deletes archive versions if they overflow max archive versions. Max archive versions are currently a configuration for default max limit, by default set to 5.

Todo:
  Introduce null|int ContentType->versionArchiveLimit to be able to let admins override this per type.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ removeTranslation()

eZ\Publish\API\Repository\ContentService::removeTranslation | ( | ContentInfo | $contentInfo,
|  |  | $languageCode
| ) |  |

Remove Content Object translation from all Versions (including archived ones) of a Content Object.

NOTE: this operation is risky and permanent, so user interface (ideally CLI) should provide a warning before performing it.

Deprecated:
  since 6.13, use {

See also
  deleteTranslation} instead

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ revealContent()

eZ\Publish\API\Repository\ContentService::revealContent | ( | ContentInfo | $contentInfo | ) |

Reveals Content hidden by hideContent API.

Locations which were hidden before hiding Content will remain hidden.

See also
  hideContent

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo | $contentInfo |

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

## ◆ updateContent()

eZ\Publish\API\Repository\ContentService::updateContent | ( | VersionInfo | $versionInfo,
|  | ContentUpdateStruct | $contentUpdateStruct
| ) |  |

Updates the fields of a draft.

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, and eZ\Publish\Core\Repository\SiteAccessAware\ContentService.

## ◆ updateContentMetadata()

eZ\Publish\API\Repository\ContentService::updateContentMetadata | ( | ContentInfo | $contentInfo,
|  | ContentMetadataUpdateStruct | $contentMetadataUpdateStruct
| ) |  |

Updates the metadata.

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

Exceptions

Implemented in eZ\Publish\Core\SignalSlot\ContentService, eZ\Publish\Core\REST\Client\ContentService, eZ\Publish\Core\Repository\SiteAccessAware\ContentService, and eZ\Publish\Core\Repository\ContentService.

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

- API/Repository/ContentService.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.