Updates the stored object state group with provided data.
abstract public updateObjectStateGroup ( eZ\Publish\SPI\Persistence\Content\ObjectState\Group $objectStateGroup ) | ||
$objectStateGroup | eZ\Publish\SPI\Persistence\Content\ObjectState\Group |
/** * Updates an object state group * * @param mixed $groupId * @param \eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input * * @return \eZ\Publish\SPI\Persistence\Content\ObjectState\Group */ public function updateGroup($groupId, InputStruct $input) { $objectStateGroup = $this->objectStateMapper->createObjectStateGroupFromInputStruct($input); $objectStateGroup->id = (int) $groupId; $this->objectStateGateway->updateObjectStateGroup($objectStateGroup); return $this->loadGroup($objectStateGroup->id); }
/** * Updates the stored object state group with provided data. * * @param \eZ\Publish\SPI\Persistence\Content\ObjectState\Group $objectStateGroup */ public function updateObjectStateGroup(Group $objectStateGroup) { try { return $this->innerGateway->updateObjectStateGroup($objectStateGroup); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }