mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-19 07:56:38 +02:00
28 lines
552 B
PHP
28 lines
552 B
PHP
<?php
|
|
/**
|
|
* Selects numerical/date content greater than the input
|
|
*
|
|
* @todo documentation
|
|
*
|
|
* @package framework
|
|
* @subpackage search
|
|
*/
|
|
class GreaterThanFilter extends SearchFilter {
|
|
|
|
/**
|
|
* @return $query
|
|
*/
|
|
public function apply(DataQuery $query) {
|
|
$this->model = $query->applyRelation($this->relation);
|
|
return $query->where(sprintf(
|
|
"%s > '%s'",
|
|
$this->getDbName(),
|
|
Convert::raw2sql($this->getDbFormattedValue())
|
|
));
|
|
}
|
|
|
|
public function isEmpty() {
|
|
return $this->getValue() == null || $this->getValue() == '';
|
|
}
|
|
}
|