From efbcc22f5af2e9b5d241a9cee0dded48353cb91e Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Tue, 3 Mar 2015 16:01:37 +0100 Subject: Add missing swimlane REST API Missing API to retrieve extra details were missing: getSwimlane($project_id, $name) getAllSwimlanes($project_id) --- app/Model/Swimlane.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/Model/Swimlane.php') 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 @@ -74,6 +74,22 @@ class Swimlane extends Base ->findOneColumn('id'); } + /** + * 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 * -- cgit v1.2.3