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

Inheritance: extends eZ\Publish\Core\REST\Server\Controller
Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$contentService eZ\Publish\API\Repository\ContentService Content service.
$locationService eZ\Publish\API\Repository\LocationService Location service.
$trashService eZ\Publish\API\Repository\TrashService Trash service.

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\LocationService $locationService, eZ\Publish\API\Repository\ContentService $contentService, eZ\Publish\API\Repository\TrashService $trashService ) Construct controller.
copySubtree ( string $locationPath, Request $request ) : ResourceCreated Copies a subtree to a new destination.
createLocation ( mixed $contentId, Request $request ) : CreatedLocation Creates a new location for object with id $contentId.
deleteSubtree ( string $locationPath ) : eZ\Publish\Core\REST\Server\Values\NoContent Deletes a location.
loadLocation ( string $locationPath ) : RestLocation Loads a location.
loadLocationByRemoteId ( Request $request ) : LocationList Loads a location by remote ID.
loadLocationChildren ( string $locationPath, Request $request ) : LocationList Loads child locations of a location.
loadLocationsForContent ( mixed $contentId, Request $request ) : LocationList Loads all locations for content object.
moveSubtree ( string $locationPath, Request $request ) : ResourceCreated Moves a subtree to a new location.
redirectLocation ( Request $request ) : TemporaryRedirect Loads the location for a given ID (x)or remote ID.
swapLocation ( string $locationPath, Request $request ) : eZ\Publish\Core\REST\Server\Values\NoContent Swaps a location with another one.
updateLocation ( string $locationPath, Request $request ) : RestLocation Updates a location.

Private Methods

Method Description
extractLocationIdFromPath ( string $path ) : mixed Extracts and returns an item id from a path, e.g. /1/2/58 => 58.

Method Details

__construct() public method

Construct controller.
public __construct ( eZ\Publish\API\Repository\LocationService $locationService, eZ\Publish\API\Repository\ContentService $contentService, eZ\Publish\API\Repository\TrashService $trashService )
$locationService eZ\Publish\API\Repository\LocationService
$contentService eZ\Publish\API\Repository\ContentService
$trashService eZ\Publish\API\Repository\TrashService

copySubtree() public method

Copies a subtree to a new destination.
public copySubtree ( string $locationPath, Request $request ) : ResourceCreated
$locationPath string
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\ResourceCreated

createLocation() public method

Creates a new location for object with id $contentId.
public createLocation ( mixed $contentId, Request $request ) : CreatedLocation
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\CreatedLocation

deleteSubtree() public method

Deletes a location.
public deleteSubtree ( string $locationPath ) : eZ\Publish\Core\REST\Server\Values\NoContent
$locationPath string
return eZ\Publish\Core\REST\Server\Values\NoContent

loadLocation() public method

Loads a location.
public loadLocation ( string $locationPath ) : RestLocation
$locationPath string
return eZ\Publish\Core\REST\Server\Values\RestLocation

loadLocationByRemoteId() public method

Loads a location by remote ID.
public loadLocationByRemoteId ( Request $request ) : LocationList
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\LocationList

loadLocationChildren() public method

Loads child locations of a location.
public loadLocationChildren ( string $locationPath, Request $request ) : LocationList
$locationPath string
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\LocationList

loadLocationsForContent() public method

Loads all locations for content object.
public loadLocationsForContent ( mixed $contentId, Request $request ) : LocationList
$contentId mixed
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\LocationList

moveSubtree() public method

Moves a subtree to a new location.
public moveSubtree ( string $locationPath, Request $request ) : ResourceCreated
$locationPath string
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\ResourceCreated | \eZ\Publish\Core\REST\Server\Values\NoContent

redirectLocation() public method

Loads the location for a given ID (x)or remote ID.
public redirectLocation ( Request $request ) : TemporaryRedirect
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\TemporaryRedirect

swapLocation() public method

Swaps a location with another one.
public swapLocation ( string $locationPath, Request $request ) : eZ\Publish\Core\REST\Server\Values\NoContent
$locationPath string
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\NoContent

updateLocation() public method

Updates a location.
public updateLocation ( string $locationPath, Request $request ) : RestLocation
$locationPath string
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\RestLocation

Property Details

$contentService protected property

Content service.
protected ContentService,eZ\Publish\API\Repository $contentService
return eZ\Publish\API\Repository\ContentService

$locationService protected property

Location service.
protected LocationService,eZ\Publish\API\Repository $locationService
return eZ\Publish\API\Repository\LocationService

$trashService protected property

Trash service.
protected TrashService,eZ\Publish\API\Repository $trashService
return eZ\Publish\API\Repository\TrashService