update() abstract public method

Will not throw anything if location id is invalid or no entries are affected.
abstract public update ( eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location, integer $locationId )
$location eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct
$locationId integer
Exemplo n.º 1
0
 /**
  * Updates an existing location.
  *
  * @throws \eZ\Publish\Core\Base\Exceptions\NotFoundException
  *
  * @param \eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location
  * @param int $locationId
  *
  * @return void
  */
 public function update(UpdateStruct $location, $locationId)
 {
     try {
         return $this->innerGateway->update($location, $locationId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Exemplo n.º 2
0
 /**
  * Updates an existing location.
  *
  * @param \eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct $location
  * @param int $locationId
  *
  * @return void
  */
 public function update(UpdateStruct $location, $locationId)
 {
     $this->locationGateway->update($location, $locationId);
 }