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

insertGroupAssignment() public method

Insert assignment of $typeId to $groupId.
public insertGroupAssignment ( mixed $groupId, mixed $typeId, integer $status )
$groupId mixed
$typeId mixed
$status integer
    public function insertGroupAssignment($groupId, $typeId, $status)
    {
        $groups = $this->loadGroupData($groupId);
        $group = $groups[0];
        $q = $this->dbHandler->createInsertQuery();
        $q->insertInto($this->dbHandler->quoteTable('ezcontentclass_classgroup'))->set($this->dbHandler->quoteColumn('contentclass_id'), $q->bindValue($typeId, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('contentclass_version'), $q->bindValue($status, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('group_id'), $q->bindValue($groupId, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('group_name'), $q->bindValue($group['name']));
        $q->prepare()->execute();
    }