1 <?php
2 3 4 5
6
7 8 9 10 11 12 13 14 15
16 class ExactMatchFilter extends SearchFilter {
17
18 19 20 21 22
23 public function apply(SQLQuery $query) {
24 $query = $this->applyRelation($query);
25 return $query->where(sprintf(
26 "%s = '%s'",
27 $this->getDbName(),
28 Convert::raw2sql($this->getValue())
29 ));
30 }
31
32 public function isEmpty() {
33 return $this->getValue() == null || $this->getValue() == '';
34 }
35 }
36 ?>
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-