PHP Class eZ\Publish\Core\SignalSlot\TrashService

Inheritance: implements eZ\Publish\API\Repository\TrashService
Exibir arquivo Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$service eZ\Publish\API\Repository\TrashService Aggregated service.
$signalDispatcher SignalDispatcher SignalDispatcher.

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\TrashService $service, SignalDispatcher $signalDispatcher ) Constructor.
deleteTrashItem ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem ) Deletes a trash item.
emptyTrash ( ) Empties trash.
findTrashItems ( eZ\Publish\API\Repository\Values\Content\Query $query ) : eZ\Publish\API\Repository\Values\Content\SearchResult Returns a collection of Trashed locations contained in the trash.
loadTrashItem ( mixed $trashItemId ) : eZ\Publish\API\Repository\Values\Content\TrashItem Loads a trashed location object from its $id.
recover ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem, eZ\Publish\API\Repository\Values\Content\Location $newParentLocation = null ) : eZ\Publish\API\Repository\Values\Content\Location Recovers the $trashedLocation at its original place if possible.
trash ( eZ\Publish\API\Repository\Values\Content\Location $location ) : null | eZ\Publish\API\Repository\Values\Content\TrashItem Sends $location and all its children to trash and returns the corresponding trash item.

Method Details

__construct() public method

Construct service object from aggregated service and signal dispatcher
public __construct ( eZ\Publish\API\Repository\TrashService $service, SignalDispatcher $signalDispatcher )
$service eZ\Publish\API\Repository\TrashService
$signalDispatcher SignalDispatcher

deleteTrashItem() public method

The corresponding content object will be removed
public deleteTrashItem ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem )
$trashItem eZ\Publish\API\Repository\Values\Content\TrashItem

emptyTrash() public method

All locations contained in the trash will be removed. Content objects will be removed if all locations of the content are gone.
public emptyTrash ( )

findTrashItems() public method

$query allows to filter/sort the elements to be contained in the collection.
public findTrashItems ( eZ\Publish\API\Repository\Values\Content\Query $query ) : eZ\Publish\API\Repository\Values\Content\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
return eZ\Publish\API\Repository\Values\Content\SearchResult

loadTrashItem() public method

Note that $id is identical to original location, which has been previously trashed
public loadTrashItem ( mixed $trashItemId ) : eZ\Publish\API\Repository\Values\Content\TrashItem
$trashItemId mixed
return eZ\Publish\API\Repository\Values\Content\TrashItem

recover() public method

Recovers the $trashedLocation at its original place if possible.
public recover ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem, eZ\Publish\API\Repository\Values\Content\Location $newParentLocation = null ) : eZ\Publish\API\Repository\Values\Content\Location
$trashItem eZ\Publish\API\Repository\Values\Content\TrashItem
$newParentLocation eZ\Publish\API\Repository\Values\Content\Location
return eZ\Publish\API\Repository\Values\Content\Location the newly created or recovered location

trash() public method

Content is left untouched.
public trash ( eZ\Publish\API\Repository\Values\Content\Location $location ) : null | eZ\Publish\API\Repository\Values\Content\TrashItem
$location eZ\Publish\API\Repository\Values\Content\Location
return null | eZ\Publish\API\Repository\Values\Content\TrashItem null if location was deleted, otherwise TrashItem

Property Details

$service protected_oe property

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

$signalDispatcher protected_oe property

SignalDispatcher.
protected SignalDispatcher,eZ\Publish\Core\SignalSlot $signalDispatcher
return SignalDispatcher