eZPublishCommunityProject  2013.4
eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler Interface Reference

The Trash Handler interface defines operations on Location elements in the storage engine. More...

+ Inheritance diagram for eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler:

Public Member Functions

 deleteTrashItem ($trashedId)
 Removes a trashed location identified by $trashedLocationId from trash Associated content has to be deleted. More...
 
 emptyTrash ()
 Empties the trash Everything contained in the trash must be removed. More...
 
 findTrashItems (Criterion $criterion=null, $offset=0, $limit=null, array $sort=null)
 Returns an array of all trashed locations satisfying the $criterion (if provided), sorted with SortClause objects contained in $sort (if any). More...
 
 loadTrashItem ($id)
 Loads the data for the trashed location identified by $id. More...
 
 recover ($trashedId, $newParentId)
 Returns a trashed location to normal state. More...
 
 trashSubtree ($locationId)
 Sends a subtree starting to $locationId to the trash and returns a Trashed object corresponding to $locationId. More...
 

Detailed Description

The Trash Handler interface defines operations on Location elements in the storage engine.

Member Function Documentation

eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler::deleteTrashItem (   $trashedId)

Removes a trashed location identified by $trashedLocationId from trash Associated content has to be deleted.

Parameters
int$trashedId
Returns
void

Implemented in eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler, and eZ\Publish\Core\Persistence\InMemory\TrashHandler.

eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler::emptyTrash ( )

Empties the trash Everything contained in the trash must be removed.

Returns
void

Implemented in eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler, and eZ\Publish\Core\Persistence\InMemory\TrashHandler.

eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler::findTrashItems ( Criterion  $criterion = null,
  $offset = 0,
  $limit = null,
array  $sort = null 
)

Returns an array of all trashed locations satisfying the $criterion (if provided), sorted with SortClause objects contained in $sort (if any).

If no criterion is provided (null), no filter is applied

Parameters
\eZ\Publish\API\Repository\Values\Content\Query\Criterion$criterion
int$offsetOffset to start listing from, 0 by default
int$limitLimit for the listing. Null by default (no limit)
\eZ\Publish\API\Repository\Values\Content\Query\SortClause[]$sort
Returns
[]

Implemented in eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler, and eZ\Publish\Core\Persistence\InMemory\TrashHandler.

eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler::loadTrashItem (   $id)

Loads the data for the trashed location identified by $id.

$id is the same as original location (which has been previously trashed)

Parameters
int$id
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException
Returns

Implemented in eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler, and eZ\Publish\Core\Persistence\InMemory\TrashHandler.

eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler::recover (   $trashedId,
  $newParentId 
)

Returns a trashed location to normal state.

Recreates the originally trashed location in the new position. If this is not possible (because the old location does not exist any more), a ParentNotFound exception is thrown.

Returns newly restored location Id.

Parameters
mixed$trashedId
mixed$newParentId
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf $newParentId is invalid
Returns
int Newly restored location id

Implemented in eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler, and eZ\Publish\Core\Persistence\InMemory\TrashHandler.

eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler::trashSubtree (   $locationId)

Sends a subtree starting to $locationId to the trash and returns a Trashed object corresponding to $locationId.

Moves all locations in the subtree to the Trash. The associated content objects are left untouched.

Parameters
mixed$locationId
Returns
null| null if location was deleted, otherwise Trashed object

Implemented in eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler, and eZ\Publish\Core\Persistence\InMemory\TrashHandler.


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