eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase::historizeBeforeSwap PHP Method

historizeBeforeSwap() public method

public historizeBeforeSwap ( $action, $languageMask )
    public function historizeBeforeSwap($action, $languageMask)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\UpdateQuery */
        $query = $this->dbHandler->createUpdateQuery();
        $query->update($this->dbHandler->quoteTable($this->table))->set($this->dbHandler->quoteColumn('is_original'), $query->bindValue(0, null, \PDO::PARAM_INT))->set($this->dbHandler->quoteColumn('id'), $query->bindValue($this->getNextId(), null, \PDO::PARAM_INT))->where($query->expr->lAnd($query->expr->eq($this->dbHandler->quoteColumn('action'), $query->bindValue($action, null, \PDO::PARAM_STR)), $query->expr->eq($this->dbHandler->quoteColumn('is_original'), $query->bindValue(1, null, \PDO::PARAM_INT)), $query->expr->gt($query->expr->bitAnd($this->dbHandler->quoteColumn('lang_mask'), $query->bindValue($languageMask & ~1, null, \PDO::PARAM_INT)), 0)));
        $query->prepare()->execute();
    }