| <?php |
|
|
| namespace Kanboard\Filter; |
|
|
| use Kanboard\Core\Filter\FilterInterface; |
| use Kanboard\Model\TaskModel; |
|
|
| |
| |
| |
| |
| |
| |
| class ProjectActivityTaskStatusFilter extends BaseFilter implements FilterInterface |
| { |
| |
| |
| |
| |
| |
| |
| public function getAttributes() |
| { |
| return array('status'); |
| } |
|
|
| |
| |
| |
| |
| |
| |
| public function apply() |
| { |
| if ($this->value === 'open') { |
| $this->query->eq(TaskModel::TABLE.'.is_active', TaskModel::STATUS_OPEN); |
| } elseif ($this->value === 'closed') { |
| $this->query->eq(TaskModel::TABLE.'.is_active', TaskModel::STATUS_CLOSED); |
| } |
|
|
| return $this; |
| } |
| } |
|
|