diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-07-29 18:45:26 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-07-29 18:45:26 -0400 |
commit | 2d6b6533acc86747425facc9e96303bcccc6daae (patch) | |
tree | 7a17fe198ba916bcaea3fcd73860d2d7610ac1e4 /app/Api | |
parent | f595fb2786d884dbaf7ec87d53cee920a0655f0e (diff) |
Add new api procedures: getDefaultTaskColor(), getDefaultTaskColors() and getColorList()
Diffstat (limited to 'app/Api')
-rw-r--r-- | app/Api/App.php | 15 | ||||
-rw-r--r-- | app/Api/Base.php | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/app/Api/App.php b/app/Api/App.php index 24da4dd9..9b3ceb94 100644 --- a/app/Api/App.php +++ b/app/Api/App.php @@ -19,4 +19,19 @@ class App extends \Core\Base { return APP_VERSION; } + + public function getDefaultTaskColor() + { + return $this->color->getDefaultColor(); + } + + public function getDefaultTaskColors() + { + return $this->color->getDefaultColors(); + } + + public function getColorList() + { + return $this->color->getList(); + } } diff --git a/app/Api/Base.php b/app/Api/Base.php index 723b60b7..17c7f79f 100644 --- a/app/Api/Base.php +++ b/app/Api/Base.php @@ -24,6 +24,9 @@ abstract class Base extends \Core\Base private $both_allowed_procedures = array( 'getTimezone', 'getVersion', + 'getDefaultTaskColor', + 'getDefaultTaskColors', + 'getColorList', 'getProjectById', 'getTask', 'getTaskByReference', @@ -67,6 +70,7 @@ abstract class Base extends \Core\Base { if (! empty($task)) { $task['url'] = $this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), '', true); + $task['color'] = $this->color->getColorProperties($task['color_id']); } return $task; |