/**
* Returns a collection of Trashed locations contained in the trash.
*
* $query allows to filter/sort the elements to be contained in the collection.
*
* @param \eZ\Publish\API\Repository\Values\Content\Query $query
*
* @return \eZ\Publish\API\Repository\Values\Content\SearchResult
*/
public function findTrashItems(Query $query)
{
$response = $this->client->request('GET', $this->requestParser->generate('trashItems'), new Message(array('Accept' => $this->outputVisitor->getMediaType('LocationList'))));
$locations = $this->inputDispatcher->parse($response);
$trashItems = array();
foreach ($locations as $location) {
$trashItems[] = $this->buildTrashItem($location);
}
return $trashItems;
}