summaryrefslogtreecommitdiff
path: root/app/Api/ColumnApi.php
blob: 45ce521d673b8727bc4e7c026a2afec5f0cf0e08 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

namespace Kanboard\Api;

/**
 * Column API controller
 *
 * @package  Kanboard\Api
 * @author   Frederic Guillot
 */
class ColumnApi extends BaseApi
{
    public function getColumns($project_id)
    {
        return $this->column->getAll($project_id);
    }

    public function getColumn($column_id)
    {
        return $this->column->getById($column_id);
    }

    public function updateColumn($column_id, $title, $task_limit = 0, $description = '')
    {
        return $this->column->update($column_id, $title, $task_limit, $description);
    }

    public function addColumn($project_id, $title, $task_limit = 0, $description = '')
    {
        return $this->column->create($project_id, $title, $task_limit, $description);
    }

    public function removeColumn($column_id)
    {
        return $this->column->remove($column_id);
    }

    public function changeColumnPosition($project_id, $column_id, $position)
    {
        return $this->column->changePosition($project_id, $column_id, $position);
    }
}