diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-23 21:44:33 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-23 21:44:33 -0400 |
commit | e32f26d048249b84166542d6442efdf202ff44fd (patch) | |
tree | 1868c5e83cec5ea8b821ad8a2036543aa37e5adb /app/Api/Swimlane.php | |
parent | c9ba525bab06eff76b1d5fb8701848d0e3990122 (diff) |
API refactoring
Diffstat (limited to 'app/Api/Swimlane.php')
-rw-r--r-- | app/Api/Swimlane.php | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/app/Api/Swimlane.php b/app/Api/Swimlane.php new file mode 100644 index 00000000..322b0805 --- /dev/null +++ b/app/Api/Swimlane.php @@ -0,0 +1,77 @@ +<?php + +namespace Api; + +/** + * Swimlane API controller + * + * @package api + * @author Frederic Guillot + */ +class Swimlane extends Base +{ + public function getActiveSwimlanes($project_id) + { + return $this->swimlane->getSwimlanes($project_id); + } + + public function getAllSwimlanes($project_id) + { + return $this->swimlane->getAll($project_id); + } + + public function getSwimlaneById($swimlane_id) + { + return $this->swimlane->getById($swimlane_id); + } + + public function getSwimlaneByName($project_id, $name) + { + return $this->swimlane->getByName($project_id, $name); + } + + public function getSwimlane($swimlane_id) + { + return $this->swimlane->getById($swimlane_id); + } + + public function getDefaultSwimlane($project_id) + { + return $this->swimlane->getDefault($project_id); + } + + public function addSwimlane($project_id, $name) + { + return $this->swimlane->create($project_id, $name); + } + + public function updateSwimlane($swimlane_id, $name) + { + return $this->swimlane->rename($swimlane_id, $name); + } + + public function removeSwimlane($project_id, $swimlane_id) + { + return $this->swimlane->remove($project_id, $swimlane_id); + } + + public function disableSwimlane($project_id, $swimlane_id) + { + return $this->swimlane->disable($project_id, $swimlane_id); + } + + public function enableSwimlane($project_id, $swimlane_id) + { + return $this->swimlane->enable($project_id, $swimlane_id); + } + + public function moveSwimlaneUp($project_id, $swimlane_id) + { + return $this->swimlane->moveUp($project_id, $swimlane_id); + } + + public function moveSwimlaneDown($project_id, $swimlane_id) + { + return $this->swimlane->moveDown($project_id, $swimlane_id); + } +} |