Allow if parameter exists in SQLFilter
This commit is contained in:
parent
f5897d4b0b
commit
1921c2f74a
@ -107,6 +107,22 @@ abstract class SQLFilter
|
|||||||
return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
|
return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a parameter was set for the filter.
|
||||||
|
*
|
||||||
|
* @param string $name Name of the parameter.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
final public function hasParameter($name)
|
||||||
|
{
|
||||||
|
if (!isset($this->parameters[$name])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns as string representation of the SQLFilter parameters (the state).
|
* Returns as string representation of the SQLFilter parameters (the state).
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user