loadTrashByLocation() abstract public method

Loads trash data specified by location ID.
abstract public loadTrashByLocation ( mixed $locationId ) : array
$locationId mixed
return array
 /**
  * Loads trash data specified by location ID
  *
  * @param mixed $locationId
  *
  * @return array
  */
 public function loadTrashByLocation($locationId)
 {
     try {
         return $this->innerGateway->loadTrashByLocation($locationId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Example #2
0
 /**
  * Loads the data for the trashed location identified by $id.
  * $id is the same as original location (which has been previously trashed)
  *
  * @param int $id
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException
  *
  * @return \eZ\Publish\SPI\Persistence\Content\Location\Trashed
  */
 public function loadTrashItem($id)
 {
     $data = $this->locationGateway->loadTrashByLocation($id);
     return $this->locationMapper->createLocationFromRow($data, null, new Trashed());
 }