PHP Класс eZ\Publish\Core\REST\Server\Controller\Content

Наследование: extends eZ\Publish\Core\REST\Server\Controller
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
copyContent ( mixed $contentId, Request $request ) : ResourceCreated Creates a new content object as copy under the given parent location given in the destination header.
createContent ( Request $request ) : CreatedContent Creates a new content draft assigned to the authenticated user.
createDraftFromCurrentVersion ( mixed $contentId ) : CreatedVersion The system creates a new draft version as a copy from the current version.
createDraftFromVersion ( mixed $contentId, mixed $versionNumber ) : CreatedVersion The system creates a new draft version as a copy from the given version.
createRelation ( mixed $contentId, integer $versionNumber, Request $request ) : CreatedRelation Creates a new relation of type COMMON for the given draft.
createView ( ) : RestExecutedView Creates and executes a content view.
deleteContent ( mixed $contentId ) : eZ\Publish\Core\REST\Server\Values\NoContent The content is deleted. If the content has locations (which is required in 4.x) on delete all locations assigned the content object are deleted via delete subtree.
deleteContentVersion ( mixed $contentId, mixed $versionNumber ) : eZ\Publish\Core\REST\Server\Values\NoContent The version is deleted.
loadContent ( mixed $contentId, Request $request ) : RestContent Loads a content info, potentially with the current version embedded.
loadContentInVersion ( mixed $contentId, integer $versionNumber, Request $request ) : Version Loads a specific version of a given content object.
loadContentVersions ( mixed $contentId, Request $request ) : VersionList Returns a list of all versions of the content. This method does not include fields and relations in the Version elements of the response.
loadVersionRelation ( mixed $contentId, integer $versionNumber, mixed $relationId, Request $request ) : RestRelation Loads a relation for the given content object and version.
loadVersionRelations ( mixed $contentId, mixed $versionNumber, Request $request ) : RelationList Loads the relations of the given version.
publishVersion ( mixed $contentId, mixed $versionNumber ) : eZ\Publish\Core\REST\Server\Values\NoContent The content version is published.
redirectContent ( Request $request ) : TemporaryRedirect Loads a content info by remote ID.
redirectCurrentVersion ( mixed $contentId ) : TemporaryRedirect Loads a specific version of a given content object.
redirectCurrentVersionRelations ( mixed $contentId ) : TemporaryRedirect Redirects to the relations of the current version.
removeRelation ( mixed $contentId, integer $versionNumber, mixed $relationId, Request $request ) : eZ\Publish\Core\REST\Server\Values\NoContent Deletes a relation of the given draft.
updateContentMetadata ( mixed $contentId, Request $request ) : RestContent Updates a content's metadata.
updateVersion ( mixed $contentId, mixed $versionNumber, Request $request ) : Version A specific draft is updated.

Защищенные методы

Метод Описание
forward ( string $controller ) : Response

Описание методов

copyContent() публичный Метод

Creates a new content object as copy under the given parent location given in the destination header.
public copyContent ( mixed $contentId, Request $request ) : ResourceCreated
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\ResourceCreated

createContent() публичный Метод

If a different userId is given in the input 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 content if it should be visible.
public createContent ( Request $request ) : CreatedContent
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\CreatedContent

createDraftFromCurrentVersion() публичный Метод

The system creates a new draft version as a copy from the current version.
public createDraftFromCurrentVersion ( mixed $contentId ) : CreatedVersion
$contentId mixed
Результат eZ\Publish\Core\REST\Server\Values\CreatedVersion

createDraftFromVersion() публичный Метод

The system creates a new draft version as a copy from the given version.
public createDraftFromVersion ( mixed $contentId, mixed $versionNumber ) : CreatedVersion
$contentId mixed
$versionNumber mixed
Результат eZ\Publish\Core\REST\Server\Values\CreatedVersion

createRelation() публичный Метод

Creates a new relation of type COMMON for the given draft.
public createRelation ( mixed $contentId, integer $versionNumber, Request $request ) : CreatedRelation
$contentId mixed
$versionNumber integer
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\CreatedRelation

createView() публичный Метод

Creates and executes a content view.
Устаревший: Since platform 1.0. Forwards the request to the new /views location, but returns a 301.
public createView ( ) : RestExecutedView
Результат eZ\Publish\Core\REST\Server\Values\RestExecutedView

deleteContent() публичный Метод

The content is deleted. If the content has locations (which is required in 4.x) on delete all locations assigned the content object are deleted via delete subtree.
public deleteContent ( mixed $contentId ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentId mixed
Результат eZ\Publish\Core\REST\Server\Values\NoContent

deleteContentVersion() публичный Метод

The version is deleted.
public deleteContentVersion ( mixed $contentId, mixed $versionNumber ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentId mixed
$versionNumber mixed
Результат eZ\Publish\Core\REST\Server\Values\NoContent

forward() защищенный Метод

protected forward ( string $controller ) : Response
$controller string
Результат Symfony\Component\HttpFoundation\Response

loadContent() публичный Метод

Loads a content info, potentially with the current version embedded.
public loadContent ( mixed $contentId, Request $request ) : RestContent
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\RestContent

loadContentInVersion() публичный Метод

Loads a specific version of a given content object.
public loadContentInVersion ( mixed $contentId, integer $versionNumber, Request $request ) : Version
$contentId mixed
$versionNumber integer
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\Version

loadContentVersions() публичный Метод

Returns a list of all versions of the content. This method does not include fields and relations in the Version elements of the response.
public loadContentVersions ( mixed $contentId, Request $request ) : VersionList
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\VersionList

loadVersionRelation() публичный Метод

Loads a relation for the given content object and version.
public loadVersionRelation ( mixed $contentId, integer $versionNumber, mixed $relationId, Request $request ) : RestRelation
$contentId mixed
$versionNumber integer
$relationId mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\RestRelation

loadVersionRelations() публичный Метод

Loads the relations of the given version.
public loadVersionRelations ( mixed $contentId, mixed $versionNumber, Request $request ) : RelationList
$contentId mixed
$versionNumber mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\RelationList

publishVersion() публичный Метод

The content version is published.
public publishVersion ( mixed $contentId, mixed $versionNumber ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentId mixed
$versionNumber mixed
Результат eZ\Publish\Core\REST\Server\Values\NoContent

redirectContent() публичный Метод

Loads a content info by remote ID.
public redirectContent ( Request $request ) : TemporaryRedirect
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

redirectCurrentVersion() публичный Метод

Loads a specific version of a given content object.
public redirectCurrentVersion ( mixed $contentId ) : TemporaryRedirect
$contentId mixed
Результат eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

redirectCurrentVersionRelations() публичный Метод

Redirects to the relations of the current version.
public redirectCurrentVersionRelations ( mixed $contentId ) : TemporaryRedirect
$contentId mixed
Результат eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

removeRelation() публичный Метод

Deletes a relation of the given draft.
public removeRelation ( mixed $contentId, integer $versionNumber, mixed $relationId, Request $request ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentId mixed
$versionNumber integer
$relationId mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\NoContent

updateContentMetadata() публичный Метод

Updates a content's metadata.
public updateContentMetadata ( mixed $contentId, Request $request ) : RestContent
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\RestContent

updateVersion() публичный Метод

A specific draft is updated.
public updateVersion ( mixed $contentId, mixed $versionNumber, Request $request ) : Version
$contentId mixed
$versionNumber mixed
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Server\Values\Version