eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase::insertGroup PHP Method

insertGroup() public method

Inserts the given $group.
public insertGroup ( eZ\Publish\SPI\Persistence\Content\Type\Group $group ) : mixed
$group eZ\Publish\SPI\Persistence\Content\Type\Group
return mixed Group ID
    public function insertGroup(Group $group)
    {
        $q = $this->dbHandler->createInsertQuery();
        $q->insertInto($this->dbHandler->quoteTable('ezcontentclassgroup'))->set($this->dbHandler->quoteColumn('id'), $this->dbHandler->getAutoIncrementValue('ezcontentclassgroup', 'id'))->set($this->dbHandler->quoteColumn('created'), $q->bindValue($group->created, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('creator_id'), $q->bindValue($group->creatorId, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('modified'), $q->bindValue($group->modified, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('modifier_id'), $q->bindValue($group->modifierId, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('name'), $q->bindValue($group->identifier));
        $q->prepare()->execute();
        return $this->dbHandler->lastInsertId($this->dbHandler->getSequenceName('ezcontentclassgroup', 'id'));
    }