mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-13 21:16:35 +02:00
23 lines
418 B
PHP
23 lines
418 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Selects numerical/date content smaller than the input
|
||
|
*
|
||
|
* @todo documentation
|
||
|
*
|
||
|
* @package sapphire
|
||
|
* @subpackage search
|
||
|
*/
|
||
|
class SmallerThanFilter extends SearchFilter {
|
||
|
|
||
|
/**
|
||
|
* @return $query
|
||
|
*/
|
||
|
public function apply(SQLQuery $query) {
|
||
|
if($this->getValue()) {
|
||
|
$query = $this->applyRelation($query);
|
||
|
return $query->where("{$this->getDbName()} < '{$this->getValue()}'");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
?>
|