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

Inheritance: extends eZ\Publish\Core\REST\Server\Controller
显示文件 Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method 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.

Protected Methods

Method Description
forward ( string $controller ) : Response

Method Details

copyContent() public method

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

createContent() public method

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

createDraftFromCurrentVersion() public method

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

createDraftFromVersion() public method

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

createRelation() public method

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

createView() public method

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
return eZ\Publish\Core\REST\Server\Values\RestExecutedView

deleteContent() public method

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

deleteContentVersion() public method

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

forward() protected method

protected forward ( string $controller ) : Response
$controller string
return Symfony\Component\HttpFoundation\Response

loadContent() public method

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

loadContentInVersion() public method

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

loadContentVersions() public method

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

loadVersionRelation() public method

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

loadVersionRelations() public method

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

publishVersion() public method

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

redirectContent() public method

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

redirectCurrentVersion() public method

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

redirectCurrentVersionRelations() public method

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

removeRelation() public method

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

updateContentMetadata() public method

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

updateVersion() public method

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