eZPublishCommunityProject  2013.9
eZ\Publish\Core\REST\Server\Controller\Location Class Reference

Location controller. More...

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

Public Member Functions

 __construct (LocationService $locationService, ContentService $contentService, TrashService $trashService)
 Construct controller. More...
 
 copySubtree ($locationPath)
 Copies a subtree to a new destination. More...
 
 createLocation ($contentId)
 Creates a new location for object with id $contentId. More...
 
 deleteSubtree ($locationPath)
 Deletes a location. More...
 
 loadLocation ($locationPath)
 Loads a location. More...
 
 loadLocationByRemoteId ()
 Loads a location by remote ID. More...
 
 loadLocationChildren ($locationPath)
 Loads child locations of a location. More...
 
 loadLocationsForContent ($contentId)
 Loads all locations for content object. More...
 
 moveSubtree ($locationPath)
 Moves a subtree to a new location. More...
 
 redirectLocation ()
 Loads the location for a given ID (x)or remote ID. More...
 
 swapLocation ($locationPath)
 Swaps a location with another one. More...
 
 updateLocation ($locationPath)
 Updates a location. More...
 
- Public Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
 setContainer (Container $container)
 
 setInputDispatcher (InputDispatcher $inputDispatcher)
 
 setRepository (Repository $repository)
 
 setRequest (Request $request=null)
 
 setRequestParser (RequestParser $requestParser)
 
 setRouter (RouterInterface $router)
 

Protected Attributes

 $contentService
 
 $locationService
 
 $trashService
 
- Protected Attributes inherited from eZ\Publish\Core\REST\Server\Controller
 $container
 
 $inputDispatcher
 
 $repository
 
 $request
 
 $requestParser
 
 $router
 

Private Member Functions

 extractLocationIdFromPath ($path)
 Extracts and returns an item id from a path, e.g. More...
 

Additional Inherited Members

- Protected Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
 getMediaType ()
 Extracts the requested media type from $request. More...
 

Detailed Description

Location controller.

Constructor & Destructor Documentation

eZ\Publish\Core\REST\Server\Controller\Location::__construct ( LocationService  $locationService,
ContentService  $contentService,
TrashService  $trashService 
)

Construct controller.

Parameters
\eZ\Publish\API\Repository\LocationService$locationService
\eZ\Publish\API\Repository\ContentService$contentService
\eZ\Publish\API\Repository\TrashService$trashService

Member Function Documentation

eZ\Publish\Core\REST\Server\Controller\Location::copySubtree (   $locationPath)

Copies a subtree to a new destination.

Parameters
$locationPath
Returns
eZ\Publish\Core\REST\Server\Controller\Location::createLocation (   $contentId)

Creates a new location for object with id $contentId.

Parameters
$contentId
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\Location::deleteSubtree (   $locationPath)

Deletes a location.

Parameters
$locationPath
Returns
eZ\Publish\Core\REST\Server\Controller\Location::extractLocationIdFromPath (   $path)
private
eZ\Publish\Core\REST\Server\Controller\Location::loadLocation (   $locationPath)

Loads a location.

Parameters
$locationPath
Returns
eZ\Publish\Core\REST\Server\Controller\Location::loadLocationByRemoteId ( )

Loads a location by remote ID.

Todo:
remove, or use in loadLocation with filter
Returns
eZ\Publish\Core\REST\Server\Controller\Location::loadLocationChildren (   $locationPath)

Loads child locations of a location.

Parameters
$locationPath
Returns
eZ\Publish\Core\REST\Server\Controller\Location::loadLocationsForContent (   $contentId)

Loads all locations for content object.

Parameters
$contentId
Returns
eZ\Publish\Core\REST\Server\Controller\Location::moveSubtree (   $locationPath)

Moves a subtree to a new location.

Parameters
$locationPath
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\BadRequestExceptionif the Destination header cannot be parsed as location or trash
Returns
eZ\Publish\Core\REST\Server\Controller\Location::redirectLocation ( )

Loads the location for a given ID (x)or remote ID.

Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\BadRequestException
Returns
eZ\Publish\Core\REST\Server\Controller\Location::swapLocation (   $locationPath)

Swaps a location with another one.

Parameters
$locationPath
Returns
eZ\Publish\Core\REST\Server\Controller\Location::updateLocation (   $locationPath)

Updates a location.

Parameters
$locationPath
Returns

Member Data Documentation

eZ\Publish\Core\REST\Server\Controller\Location::$contentService
protected
eZ\Publish\Core\REST\Server\Controller\Location::$locationService
protected
eZ\Publish\Core\REST\Server\Controller\Location::$trashService
protected

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