diff options
author | Christopher Geelen <christopher.geelen@vinotion.nl> | 2016-07-27 13:58:23 +0200 |
---|---|---|
committer | Christopher Geelen <christopher.geelen@vinotion.nl> | 2016-07-27 13:58:23 +0200 |
commit | 24745182724ca69092554eb5946e31584420f68a (patch) | |
tree | 386cdf7a8d7bf7ad2d80d938333bafbaf0fedcbc /app/Filter | |
parent | 160c0b885eb4f1a1a1baa2b6b9fc6d99fdb80d0c (diff) | |
parent | 9649f7ba82ba7fe6a470abfe9f65e214cc68fa34 (diff) |
Merge remote-tracking branch 'upstream/master'
Conflicts:
app/Job/NotificationJob.php
Diffstat (limited to 'app/Filter')
-rw-r--r-- | app/Filter/TaskPriorityFilter.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/Filter/TaskPriorityFilter.php b/app/Filter/TaskPriorityFilter.php new file mode 100644 index 00000000..75f6ae3d --- /dev/null +++ b/app/Filter/TaskPriorityFilter.php @@ -0,0 +1,38 @@ +<?php + +namespace Kanboard\Filter; + +use Kanboard\Core\Filter\FilterInterface; +use Kanboard\Model\TaskModel; + +/** + * Class TaskPriorityFilter + * + * @package Kanboard\Filter + * @author Frederic Guillot + */ +class TaskPriorityFilter extends BaseFilter implements FilterInterface +{ + /** + * Get search attribute + * + * @access public + * @return string[] + */ + public function getAttributes() + { + return array('priority'); + } + + /** + * Apply filter + * + * @access public + * @return FilterInterface + */ + public function apply() + { + $this->query->eq(TaskModel::TABLE.'.priority', $this->value); + return $this; + } +} |