summaryrefslogtreecommitdiff
path: root/plugins/Calendar/Formatter/ProjectApiFormatter.php
blob: 5520801c47ce6e151b8fc73bcf710cc06e4e2c9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace Kanboard\Plugin\Calendar\Formatter;

/**
 * Class ProjectApiFormatter
 *
 * @package Kanboard\Plugin\Calendar\Formatter
 */
class ProjectApiFormatter extends \Kanboard\Formatter\ProjectApiFormatter
{
    public function format()
    {
        $project = parent::format();

        if (! empty($project)) {
            $project['url']['calendar'] = $this->helper->url->to('CalendarController', 'project', array('project_id' => $project['id'], 'plugin' => 'Calendar'), '', true);
        }

        return $project;
    }
}