eZPublishCommunityProject  2013.5
eZ\Publish\Core\REST\Server\Controller\Content Class Reference

Content controller. More...

+ Inheritance diagram for eZ\Publish\Core\REST\Server\Controller\Content:
+ Collaboration diagram for eZ\Publish\Core\REST\Server\Controller\Content:

Public Member Functions

 __construct (ContentService $contentService, ContentTypeService $contentTypeService, LocationService $locationService, SectionService $sectionService, SearchService $searchService)
 Construct controller. More...
 
 copyContent ()
 Creates a new content object as copy under the given parent location given in the destination header. More...
 
 createContent ()
 Creates a new content draft assigned to the authenticated user. More...
 
 createDraftFromCurrentVersion ()
 The system creates a new draft version as a copy from the current version. More...
 
 createDraftFromVersion ()
 The system creates a new draft version as a copy from the given version. More...
 
 createRelation ()
 Creates a new relation of type COMMON for the given draft. More...
 
 createView ()
 Creates and executes a content view. More...
 
 deleteContent ()
 The content is deleted. More...
 
 deleteContentVersion ()
 The version is deleted. More...
 
 loadContent ()
 Loads a content info, potentially with the current version embedded. More...
 
 loadContentInVersion ()
 Loads a specific version of a given content object. More...
 
 loadContentVersions ()
 Returns a list of all versions of the content. More...
 
 loadVersionRelation ()
 Loads a relation for the given content object and version. More...
 
 loadVersionRelations ()
 Loads the relations of the given version. More...
 
 publishVersion ()
 The content version is published. More...
 
 redirectContent ()
 Loads a content info by remote ID. More...
 
 redirectCurrentVersion ()
 Loads a specific version of a given content object. More...
 
 redirectCurrentVersionRelations ()
 Redirects to the relations of the current version. More...
 
 removeRelation ()
 Deletes a relation of the given draft. More...
 
 updateContentMetadata ()
 Updates a content's metadata. More...
 
 updateVersion ()
 A specific draft is updated. More...
 
- Public Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
 setContainer (Container $container)
 
 setInputDispatcher (InputDispatcher $inputDispatcher)
 
 setRequest (HttpRequest $request)
 
 setUrlHandler (UrlHandler $urlHandler)
 

Protected Member Functions

 getMediaType ()
 Extracts the requested media type from $request. More...
 

Protected Attributes

 $contentService
 
 $contentTypeService
 
 $locationService
 
 $searchService
 
 $sectionService
 
- Protected Attributes inherited from eZ\Publish\Core\REST\Server\Controller
 $container
 
 $inputDispatcher
 
 $request
 
 $urlHandler
 

Detailed Description

Content controller.

Constructor & Destructor Documentation

eZ\Publish\Core\REST\Server\Controller\Content::__construct ( ContentService  $contentService,
ContentTypeService  $contentTypeService,
LocationService  $locationService,
SectionService  $sectionService,
SearchService  $searchService 
)

Construct controller.

Parameters
\eZ\Publish\API\Repository\ContentService$contentService
\eZ\Publish\API\Repository\ContentTypeService$contentTypeService
\eZ\Publish\API\Repository\LocationService$locationService
\eZ\Publish\API\Repository\SectionService$sectionService
\eZ\Publish\API\Repository\SearchService$searchService

Member Function Documentation

eZ\Publish\Core\REST\Server\Controller\Content::copyContent ( )

Creates a new content object as copy under the given parent location given in the destination header.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::createContent ( )

Creates a new content draft assigned to the authenticated user.

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.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::createDraftFromCurrentVersion ( )

The system creates a new draft version as a copy from the current version.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::createDraftFromVersion ( )

The system creates a new draft version as a copy from the given version.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::createRelation ( )

Creates a new relation of type COMMON for the given draft.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::createView ( )

Creates and executes a content view.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::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.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::deleteContentVersion ( )

The version is deleted.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::getMediaType ( )
protected

Extracts the requested media type from $request.

Returns
string

Referenced by eZ\Publish\Core\REST\Server\Controller\Content\createContent(), and eZ\Publish\Core\REST\Server\Controller\Content\loadContent().

eZ\Publish\Core\REST\Server\Controller\Content::loadContent ( )

Loads a content info, potentially with the current version embedded.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::loadContentInVersion ( )

Loads a specific version of a given content object.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::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.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::loadVersionRelation ( )

Loads a relation for the given content object and version.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::loadVersionRelations ( )

Loads the relations of the given version.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::publishVersion ( )

The content version is published.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::redirectContent ( )

Loads a content info by remote ID.

Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\BadRequestException
Returns
eZ\Publish\Core\REST\Server\Controller\Content::redirectCurrentVersion ( )

Loads a specific version of a given content object.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::redirectCurrentVersionRelations ( )

Redirects to the relations of the current version.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::removeRelation ( )

Deletes a relation of the given draft.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::updateContentMetadata ( )

Updates a content's metadata.

Returns
eZ\Publish\Core\REST\Server\Controller\Content::updateVersion ( )

A specific draft is updated.

Returns

Member Data Documentation

eZ\Publish\Core\REST\Server\Controller\Content::$contentService
protected
eZ\Publish\Core\REST\Server\Controller\Content::$contentTypeService
protected
eZ\Publish\Core\REST\Server\Controller\Content::$locationService
protected
eZ\Publish\Core\REST\Server\Controller\Content::$searchService
protected
eZ\Publish\Core\REST\Server\Controller\Content::$sectionService
protected

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