diff options
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/TaskFilter.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/Model/TaskFilter.php b/app/Model/TaskFilter.php index e9d9ccbd..0bac3f46 100644 --- a/app/Model/TaskFilter.php +++ b/app/Model/TaskFilter.php @@ -68,6 +68,9 @@ class TaskFilter extends Base case 'T_COLUMN': $this->filterByColumnName($value); break; + case 'T_REFERENCE': + $this->filterByReference($value); + break; } } @@ -141,6 +144,22 @@ class TaskFilter extends Base } /** + * Filter by reference + * + * @access public + * @param string $reference + * @return TaskFilter + */ + public function filterByReference($reference) + { + if (! empty($reference)) { + $this->query->eq(Task::TABLE.'.reference', $reference); + } + + return $this; + } + + /** * Filter by title * * @access public |