Class

eZ\Publish\Core\REST\Server\Controller\Trash

class Trash extends Controller

Trash controller.

Methods

setInputDispatcher(Dispatcher $inputDispatcher)

from Controller
setRouter(RouterInterface $router)

from Controller
setRepository(Repository $repository)

from Controller
setRequestParser(RequestParser $requestParser)

from Controller
__construct(TrashService $trashService, LocationService $locationService)

Construct controller.

Trash loadTrashItems(Request $request)

Returns a list of all trash items.

RestTrashItem loadTrashItem($trashItemId $trashItemId)

Returns the trash item given by id.

NoContent emptyTrash()

Empties the trash.

NoContent deleteTrashItem($trashItemId $trashItemId)

Deletes the given trash item.

ResourceCreated restoreTrashItem($trashItemId, Request $request)

Restores a trashItem.

Details

in Controller at line 45
public setInputDispatcher(Dispatcher $inputDispatcher)

Parameters

Dispatcher $inputDispatcher

in Controller at line 50
public setRouter(RouterInterface $router)

Parameters

RouterInterface $router

in Controller at line 55
public setRepository(Repository $repository)

Parameters

Repository $repository

in Controller at line 60
public setRequestParser(RequestParser $requestParser)

Parameters

RequestParser $requestParser

at line 46
public __construct(TrashService $trashService, LocationService $locationService)

Construct controller.

Parameters

TrashService $trashService
LocationService $locationService

at line 57
public Trash loadTrashItems(Request $request)

Returns a list of all trash items.

Parameters

Request $request

Return Value

Trash

at line 88
public RestTrashItem loadTrashItem($trashItemId $trashItemId)

Returns the trash item given by id.

Parameters

$trashItemId $trashItemId

Return Value

RestTrashItem

at line 101
public NoContent emptyTrash()

Empties the trash.

Return Value

NoContent

at line 115
public NoContent deleteTrashItem($trashItemId $trashItemId)

Deletes the given trash item.

Parameters

$trashItemId $trashItemId

Return Value

NoContent

at line 133
public ResourceCreated restoreTrashItem($trashItemId, Request $request)

Restores a trashItem.

Parameters

$trashItemId
Request $request

Return Value

ResourceCreated

Exceptions

ForbiddenException