summaryrefslogtreecommitdiff
path: root/app/Api/BoardApi.php
blob: 70f21c0e469b286211c16d34958a7e3fe4a8f6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Kanboard\Api;

use Kanboard\Formatter\BoardFormatter;

/**
 * Board API controller
 *
 * @package  Kanboard\Api
 * @author   Frederic Guillot
 */
class BoardApi extends BaseApi
{
    public function getBoard($project_id)
    {
        $this->checkProjectPermission($project_id);

        return BoardFormatter::getInstance($this->container)
            ->withProjectId($project_id)
            ->withQuery($this->taskFinderModel->getExtendedQuery())
            ->format();
    }
}