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

updateType() public method

Update a type with $updateStruct.
public updateType ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct $updateStruct )
$typeId mixed
$status integer
$updateStruct eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct
    public function updateType($typeId, $status, UpdateStruct $updateStruct)
    {
        $q = $this->dbHandler->createUpdateQuery();
        $q->update($this->dbHandler->quoteTable('ezcontentclass'));
        $this->setCommonTypeColumns($q, $updateStruct);
        $q->where($q->expr->lAnd($q->expr->eq($this->dbHandler->quoteColumn('id'), $q->bindValue($typeId, null, \PDO::PARAM_INT)), $q->expr->eq($this->dbHandler->quoteColumn('version'), $q->bindValue($status, null, \PDO::PARAM_INT))));
        $q->prepare()->execute();
        $this->deleteTypeNameData($typeId, $status);
        $this->insertTypeNameData($typeId, $status, $updateStruct->name);
    }