updateObjectState() абстрактный публичный Метод

Updates the stored object state with provided data.
abstract public updateObjectState ( eZ\Publish\SPI\Persistence\Content\ObjectState $objectState )
$objectState eZ\Publish\SPI\Persistence\Content\ObjectState
Пример #1
0
 /**
  * Updates an object state
  *
  * @param mixed $stateId
  * @param \eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ObjectState
  */
 public function update($stateId, InputStruct $input)
 {
     $objectState = $this->objectStateMapper->createObjectStateFromInputStruct($input);
     $objectState->id = (int) $stateId;
     $this->objectStateGateway->updateObjectState($objectState);
     return $this->load($objectState->id);
 }
 /**
  * Updates the stored object state with provided data.
  *
  * @param \eZ\Publish\SPI\Persistence\Content\ObjectState $objectState
  */
 public function updateObjectState(ObjectState $objectState)
 {
     try {
         return $this->innerGateway->updateObjectState($objectState);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }