summaryrefslogtreecommitdiff
path: root/app/Api/Swimlane.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-05 11:23:51 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-05 11:23:51 -0400
commitbac18d80f8ff8fce9d167671273e80a492f4c3c5 (patch)
treecdb950786eb3d8a92c7307695ce6680041b5a175 /app/Api/Swimlane.php
parent69c5c83d34229c92a6b9c38c225a81058ab94047 (diff)
parent42a3a56a91bbc6f1f8c913c8a990d9ea549d481b (diff)
Merge pull-request #1178
Diffstat (limited to 'app/Api/Swimlane.php')
-rw-r--r--app/Api/Swimlane.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/Api/Swimlane.php b/app/Api/Swimlane.php
index fb40841f..13838d77 100644
--- a/app/Api/Swimlane.php
+++ b/app/Api/Swimlane.php
@@ -40,14 +40,18 @@ class Swimlane extends \Core\Base
return $this->swimlane->getDefault($project_id);
}
- public function addSwimlane($project_id, $name)
+ public function addSwimlane($project_id, $name, $description = '')
{
- return $this->swimlane->create($project_id, $name);
+ return $this->swimlane->create(array('project_id' => $project_id, 'name' => $name, 'description' => $description));
}
- public function updateSwimlane($swimlane_id, $name)
+ public function updateSwimlane($swimlane_id, $name, $description = null)
{
- return $this->swimlane->rename($swimlane_id, $name);
+ $values = array('id' => $swimlane_id, 'name' => $name);
+ if (!is_null($description)) {
+ $values['description'] = $description;
+ }
+ return $this->swimlane->update($values);
}
public function removeSwimlane($project_id, $swimlane_id)