summaryrefslogtreecommitdiff
path: root/app/Model/Swimlane.php
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2015-03-03 16:01:37 +0100
committerFrancois Ferrand <thetypz@gmail.com>2015-03-03 16:35:45 +0100
commitefbcc22f5af2e9b5d241a9cee0dded48353cb91e (patch)
tree447a9abe9c90a4fce1f3b3ec64cb97ebc8bcca97 /app/Model/Swimlane.php
parent23f8f2c576271a9007b5da0a4d0ba144ad66086d (diff)
Add missing swimlane REST API
Missing API to retrieve extra details were missing: getSwimlane($project_id, $name) getAllSwimlanes($project_id)
Diffstat (limited to 'app/Model/Swimlane.php')
-rw-r--r--app/Model/Swimlane.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Model/Swimlane.php b/app/Model/Swimlane.php
index c9bc43e1..c189c91f 100644
--- a/app/Model/Swimlane.php
+++ b/app/Model/Swimlane.php
@@ -75,6 +75,22 @@ class Swimlane extends Base
}
/**
+ * Get a swimlane by the project and the name
+ *
+ * @access public
+ * @param integer $project_id Project id
+ * @param string $name Name
+ * @return integer
+ */
+ public function getByName($project_id, $name)
+ {
+ return $this->db->table(self::TABLE)
+ ->eq('project_id', $project_id)
+ ->eq('name', $name)
+ ->findAll();
+ }
+
+ /**
* Get default swimlane properties
*
* @access public