Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\REST\Server\Controller\Trash Class Reference

Trash controller. More...

Inheritance diagram for eZ\Publish\Core\REST\Server\Controller\Trash:

## Public Member Functions
| __construct (TrashService $trashService, LocationService $locationService)
| Construct controller. More...
| loadTrashItems (Request $request)
| Returns a list of all trash items. More...
| loadTrashItem ($trashItemId)
| Returns the trash item given by id. More...
| emptyTrash ()
| Empties the trash. More...
| deleteTrashItem ($trashItemId)
| Deletes the given trash item. More...
| restoreTrashItem ($trashItemId, Request $request)
| Restores a trashItem. More...
Public Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
| setInputDispatcher (InputDispatcher $inputDispatcher)
| setRouter (RouterInterface $router)
| setRepository (Repository $repository)
| setRequestParser (RequestParser $requestParser)

## Protected Attributes
| $trashService
| $locationService
Protected Attributes inherited from eZ\Publish\Core\REST\Server\Controller
| $inputDispatcher
| $router
| $requestParser
| $repository

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
| getMediaType (Request $request)
| Extracts the requested media type from $request. More...

## Detailed Description

Trash controller.

Definition at line 22 of file REST/Server/Controller/Trash.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\REST\Server\Controller\Trash::__construct | ( | TrashService | $trashService,
|  | LocationService | $locationService
| ) |  |

Construct controller.

Parameters

  \eZ\Publish\API\Repository\TrashService | $trashService |
  \eZ\Publish\API\Repository\LocationService | $locationService |

Definition at line 44 of file REST/Server/Controller/Trash.php.

References eZ\Publish\Core\REST\Server\Controller\Trash\$locationService, and eZ\Publish\Core\REST\Server\Controller\Trash\$trashService.

## Member Function Documentation

## ◆ deleteTrashItem()

eZ\Publish\Core\REST\Server\Controller\Trash::deleteTrashItem | ( |  | $trashItemId | ) |

Deletes the given trash item.

Parameters

  $trashItemId |

Returns
  \eZ\Publish\Core\REST\Server\Values\NoContent

Definition at line 113 of file REST/Server/Controller/Trash.php.

## ◆ emptyTrash()

eZ\Publish\Core\REST\Server\Controller\Trash::emptyTrash | ( |  | ) |

Empties the trash.

Returns
  \eZ\Publish\Core\REST\Server\Values\NoContent

Definition at line 99 of file REST/Server/Controller/Trash.php.

## ◆ loadTrashItem()

eZ\Publish\Core\REST\Server\Controller\Trash::loadTrashItem | ( |  | $trashItemId | ) |

Returns the trash item given by id.

Parameters

  $trashItemId |

Returns
  \eZ\Publish\Core\REST\Server\Values\RestTrashItem

Definition at line 86 of file REST/Server/Controller/Trash.php.

## ◆ loadTrashItems()

eZ\Publish\Core\REST\Server\Controller\Trash::loadTrashItems | ( | Request | $request | ) |

Returns a list of all trash items.

Returns
  \eZ\Publish\Core\REST\Server\Values\Trash

Definition at line 55 of file REST/Server/Controller/Trash.php.

## ◆ restoreTrashItem()

eZ\Publish\Core\REST\Server\Controller\Trash::restoreTrashItem | ( |  | $trashItemId,
|  | Request | $request
| ) |  |

Restores a trashItem.

Parameters

  $trashItemId |

Exceptions

Definition at line 131 of file REST/Server/Controller/Trash.php.

## Member Data Documentation

## ◆ $locationService

eZ\Publish\Core\REST\Server\Controller\Trash::$locationService
| protected

Definition at line 36 of file REST/Server/Controller/Trash.php.

Referenced by eZ\Publish\Core\REST\Server\Controller\Trash\__construct().

## ◆ $trashService

eZ\Publish\Core\REST\Server\Controller\Trash::$trashService
| protected

Definition at line 29 of file REST/Server/Controller/Trash.php.

Referenced by eZ\Publish\Core\REST\Server\Controller\Trash\__construct().

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

- REST/Server/Controller/Trash.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.