/**
* 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
*
* @param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion
* @param int $offset Offset to start listing from, 0 by default
* @param int $limit Limit for the listing. Null by default (no limit)
* @param \eZ\Publish\API\Repository\Values\Content\Query\SortClause[] $sort
*
* @return \eZ\Publish\SPI\Persistence\Content\Location\Trashed[]
*/
public function findTrashItems(Criterion $criterion = null, $offset = 0, $limit = null, array $sort = null)
{
// CBA: Ignore criterion for now.
$rows = $this->locationGateway->listTrashed($offset, $limit, $sort);
$items = array();
foreach ($rows as $row) {
$items[] = $this->locationMapper->createLocationFromRow($row, null, new Trashed());
}
return $items;
}