Inserts a new object state group into database.
abstract public insertObjectStateGroup ( eZ\Publish\SPI\Persistence\Content\ObjectState\Group $objectStateGroup ) | ||
$objectStateGroup | eZ\Publish\SPI\Persistence\Content\ObjectState\Group |
/** * Inserts a new object state group into database. * * @param \eZ\Publish\SPI\Persistence\Content\ObjectState\Group $objectStateGroup */ public function insertObjectStateGroup(Group $objectStateGroup) { try { return $this->innerGateway->insertObjectStateGroup($objectStateGroup); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Creates a new object state group * * @param \eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input * * @return \eZ\Publish\SPI\Persistence\Content\ObjectState\Group */ public function createGroup(InputStruct $input) { $objectStateGroup = $this->objectStateMapper->createObjectStateGroupFromInputStruct($input); $this->objectStateGateway->insertObjectStateGroup($objectStateGroup); return $objectStateGroup; }