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

remove() public method

If $id is set only autogenerated entries will be removed.
public remove ( mixed $action, mixed | null $id = null ) : boolean
$action mixed
$id mixed | null
return boolean
    public function remove($action, $id = null)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\DeleteQuery */
        $query = $this->dbHandler->createDeleteQuery();
        $query->deleteFrom($this->dbHandler->quoteTable($this->table))->where($query->expr->eq($this->dbHandler->quoteColumn('action'), $query->bindValue($action, null, \PDO::PARAM_STR)));
        if ($id !== null) {
            $query->where($query->expr->lAnd($query->expr->eq($this->dbHandler->quoteColumn('is_alias'), $query->bindValue(0, null, \PDO::PARAM_INT)), $query->expr->eq($this->dbHandler->quoteColumn('id'), $query->bindValue($id, null, \PDO::PARAM_INT))));
        }
        $query->prepare()->execute();
    }