| | <?php |
| |
|
| | namespace Kanboard\Formatter; |
| |
|
| | use Kanboard\Core\Filter\FormatterInterface; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | class TaskApiFormatter extends BaseFormatter implements FormatterInterface |
| | { |
| | protected $task = null; |
| |
|
| | public function withTask($task) |
| | { |
| | $this->task = $task; |
| | return $this; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function format() |
| | { |
| | if (! empty($this->task)) { |
| | $this->task['url'] = $this->helper->url->to('TaskViewController', 'show', array('task_id' => $this->task['id']), '', true); |
| | $this->task['color'] = $this->colorModel->getColorProperties($this->task['color_id']); |
| | } |
| |
|
| | return $this->task; |
| | } |
| | } |
| |
|