Merge pull request #963 from mdemo/master
SQLFilter -- allows to check if a parameter was set
This commit is contained in:
commit
71fc425902
@ -107,6 +107,22 @@ abstract class SQLFilter
|
||||
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).
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user