Loads data for section with $id.
abstract public loadSectionData ( integer $id ) : string[][] | ||
$id | integer | |
return | string[][] |
/** * Get section data * * @param mixed $id * * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If section is not found * * @return \eZ\Publish\SPI\Persistence\Content\Section */ public function load($id) { $rows = $this->sectionGateway->loadSectionData($id); if (empty($rows)) { throw new NotFound("Section", $id); } return $this->createSectionFromArray(reset($rows)); }
/** * Loads data for section with $id. * * @param int $id * * @return string[][] */ public function loadSectionData($id) { try { return $this->innerGateway->loadSectionData($id); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }