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

Core/Repository/SiteAccessAware/TrashService.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Repository\SiteAccessAware;
8
9 use eZ\Publish\API\Repository\TrashService as TrashServiceInterface;
10 use eZ\Publish\API\Repository\Values\Content\TrashItem;
11 use eZ\Publish\API\Repository\Values\Content\Location;
12 use eZ\Publish\API\Repository\Values\Content\Query;
13
19 class TrashService implements TrashServiceInterface
20 {
22 protected $service;
23
29 public function __construct(
30 TrashServiceInterface $service
31 ) {
32 $this->service = $service;
33 }
34
35 public function loadTrashItem($trashItemId)
36 {
37 return $this->service->loadTrashItem($trashItemId);
38 }
39
40 public function trash(Location $location)
41 {
42 return $this->service->trash($location);
43 }
44
45 public function recover(TrashItem $trashItem, Location $newParentLocation = null)
46 {
47 return $this->service->recover($trashItem, $newParentLocation);
48 }
49
50 public function emptyTrash()
51 {
52 return $this->service->emptyTrash();
53 }
54
55 public function deleteTrashItem(TrashItem $trashItem)
56 {
57 return $this->service->deleteTrashItem($trashItem);
58 }
59
60 public function findTrashItems(Query $query)
61 {
62 return $this->service->findTrashItems($query);
63 }
64 }
eZ\Publish\API\Repository\Values\Content\Location
Definition: API/Repository/Values/Content/Location.php:32
eZ\Publish\API\Repository\Values\Content\Query
This class is used to perform a Content query.
Definition: API/Repository/Values/Content/Query.php:15
eZ\Publish\API\Repository\Values\Content\TrashItem
this class represents a trash item, which is actually a trashed location.
Definition: API/Repository/Values/Content/TrashItem.php:13
eZ\Publish\Core\Repository\SiteAccessAware\TrashService
TrashService for SiteAccessAware layer.
Definition: Core/Repository/SiteAccessAware/TrashService.php:20
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\loadTrashItem
loadTrashItem($trashItemId)
Loads a trashed location object from its $id.
Definition: Core/Repository/SiteAccessAware/TrashService.php:35
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\deleteTrashItem
deleteTrashItem(TrashItem $trashItem)
Deletes a trash item.
Definition: Core/Repository/SiteAccessAware/TrashService.php:55
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\__construct
__construct(TrashServiceInterface $service)
Construct service object from aggregated service.
Definition: Core/Repository/SiteAccessAware/TrashService.php:29
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\recover
recover(TrashItem $trashItem, Location $newParentLocation=null)
Recovers the $trashedLocation at its original place if possible.
Definition: Core/Repository/SiteAccessAware/TrashService.php:45
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\$service
$service
Definition: Core/Repository/SiteAccessAware/TrashService.php:22
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\findTrashItems
findTrashItems(Query $query)
Returns a collection of Trashed locations contained in the trash, which are readable by the current u...
Definition: Core/Repository/SiteAccessAware/TrashService.php:60
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\trash
trash(Location $location)
Sends $location and all its children to trash and returns the corresponding trash item.
Definition: Core/Repository/SiteAccessAware/TrashService.php:40
eZ\Publish\Core\Repository\SiteAccessAware\TrashService\emptyTrash
emptyTrash()
Empties trash.
Definition: Core/Repository/SiteAccessAware/TrashService.php:50
eZ\Publish\API\Repository\TrashService
Trash service, used for managing trashed content.
Definition: API/Repository/TrashService.php:17
eZ\Publish\Core\Repository\SiteAccessAware
Definition: Core/Repository/SiteAccessAware/ContentService.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.