1<?php
2
3namespace Kanboard\Filter;
4
5use Kanboard\Core\Filter\FilterInterface;
6use Kanboard\Model\TaskModel;
7
8/**
9 * Filter tasks by creation date
10 *
11 * @package filter
12 * @author  Frederic Guillot
13 */
14class TaskCreationDateFilter extends BaseDateFilter implements FilterInterface
15{
16    /**
17     * Get search attribute
18     *
19     * @access public
20     * @return string[]
21     */
22    public function getAttributes()
23    {
24        return array('created');
25    }
26
27    /**
28     * Apply filter
29     *
30     * @access public
31     * @return FilterInterface
32     */
33    public function apply()
34    {
35        $this->applyDateFilter(TaskModel::TABLE.'.date_creation');
36        return $this;
37    }
38}
39