PHP Class eZ\Publish\Core\REST\Server\Controller\Content

Inheritance: extends eZ\Publish\Core\REST\Server\Controller
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
forward ( string $controller ) : Response

Method Details

copyContent() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\ResourceCreated

createContent() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\CreatedContent

createDraftFromCurrentVersion() public méthode

The system creates a new draft version as a copy from the current version.
public createDraftFromCurrentVersion ( mixed $contentId ) : CreatedVersion
$contentId mixed
Résultat eZ\Publish\Core\REST\Server\Values\CreatedVersion

createDraftFromVersion() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\CreatedVersion

createRelation() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\CreatedRelation

createView() public méthode

Creates and executes a content view.
Deprecation: Since platform 1.0. Forwards the request to the new /views location, but returns a 301.
public createView ( ) : RestExecutedView
Résultat eZ\Publish\Core\REST\Server\Values\RestExecutedView

deleteContent() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\NoContent

deleteContentVersion() public méthode

The version is deleted.
public deleteContentVersion ( mixed $contentId, mixed $versionNumber ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentId mixed
$versionNumber mixed
Résultat eZ\Publish\Core\REST\Server\Values\NoContent

forward() protected méthode

protected forward ( string $controller ) : Response
$controller string
Résultat Symfony\Component\HttpFoundation\Response

loadContent() public méthode

Loads a content info, potentially with the current version embedded.
public loadContent ( mixed $contentId, Request $request ) : RestContent
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\RestContent

loadContentInVersion() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\Version

loadContentVersions() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\VersionList

loadVersionRelation() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\RestRelation

loadVersionRelations() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\RelationList

publishVersion() public méthode

The content version is published.
public publishVersion ( mixed $contentId, mixed $versionNumber ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentId mixed
$versionNumber mixed
Résultat eZ\Publish\Core\REST\Server\Values\NoContent

redirectContent() public méthode

Loads a content info by remote ID.
public redirectContent ( Request $request ) : TemporaryRedirect
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

redirectCurrentVersion() public méthode

Loads a specific version of a given content object.
public redirectCurrentVersion ( mixed $contentId ) : TemporaryRedirect
$contentId mixed
Résultat eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

redirectCurrentVersionRelations() public méthode

Redirects to the relations of the current version.
public redirectCurrentVersionRelations ( mixed $contentId ) : TemporaryRedirect
$contentId mixed
Résultat eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

removeRelation() public méthode

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
Résultat eZ\Publish\Core\REST\Server\Values\NoContent

updateContentMetadata() public méthode

Updates a content's metadata.
public updateContentMetadata ( mixed $contentId, Request $request ) : RestContent
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\RestContent

updateVersion() public méthode

A specific draft is updated.
public updateVersion ( mixed $contentId, mixed $versionNumber, Request $request ) : Version
$contentId mixed
$versionNumber mixed
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\Version