diff options
Diffstat (limited to 'app/Filter/ProjectActivityTaskIdFilter.php')
-rw-r--r-- | app/Filter/ProjectActivityTaskIdFilter.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/Filter/ProjectActivityTaskIdFilter.php b/app/Filter/ProjectActivityTaskIdFilter.php new file mode 100644 index 00000000..e99efe09 --- /dev/null +++ b/app/Filter/ProjectActivityTaskIdFilter.php @@ -0,0 +1,38 @@ +<?php + +namespace Kanboard\Filter; + +use Kanboard\Core\Filter\FilterInterface; +use Kanboard\Model\ProjectActivity; + +/** + * Filter activity events by taskId + * + * @package filter + * @author Frederic Guillot + */ +class ProjectActivityTaskIdFilter extends BaseFilter implements FilterInterface +{ + /** + * Get search attribute + * + * @access public + * @return string[] + */ + public function getAttributes() + { + return array('task_id'); + } + + /** + * Apply filter + * + * @access public + * @return FilterInterface + */ + public function apply() + { + $this->query->eq(ProjectActivity::TABLE.'.task_id', $this->value); + return $this; + } +} |