/** * Update name and identifier of a section * * @param mixed $id * @param string $name * @param string $identifier * * @return \eZ\Publish\SPI\Persistence\Content\Section */ public function update($id, $name, $identifier) { $this->sectionGateway->updateSection($id, $name, $identifier); $section = new Section(); $section->id = $id; $section->name = $name; $section->identifier = $identifier; return $section; }
/** * Updates section with $id to have $name and $identifier. * * @param int $id * @param string $name * @param string $identifier */ public function updateSection($id, $name, $identifier) { try { return $this->innerGateway->updateSection($id, $name, $identifier); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }