listTrashed() abstract public method

Returns entries from ezcontentobject_trash.
abstract public listTrashed ( integer $offset, integer $limit, array $sort = null ) : array
$offset integer
$limit integer
$sort array
return array
コード例 #1
0
 /**
  * Lists trashed items.
  * Returns entries from ezcontentobject_trash.
  *
  * @param int $offset
  * @param int $limit
  * @param array $sort
  *
  * @return array
  */
 public function listTrashed($offset, $limit, array $sort = null)
 {
     try {
         return $this->innerGateway->listTrashed($offset, $limit, $sort);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
コード例 #2
0
ファイル: Handler.php プロジェクト: CG77/ezpublish-kernel
 /**
  * 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;
 }