summaryrefslogtreecommitdiff
path: root/app/Model/SwimlaneModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-01 21:28:24 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-01 21:28:24 -0400
commitc50255813b1f2de3709b17492d32c9e4ce280236 (patch)
treebac9a31956c558526e831c05c74ef03c676e453b /app/Model/SwimlaneModel.php
parentca87b1b60f9b4b49c80920e5009d6fbe4e3fb514 (diff)
Added mail helper
Diffstat (limited to 'app/Model/SwimlaneModel.php')
-rw-r--r--app/Model/SwimlaneModel.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Model/SwimlaneModel.php b/app/Model/SwimlaneModel.php
index 87591b99..35e39879 100644
--- a/app/Model/SwimlaneModel.php
+++ b/app/Model/SwimlaneModel.php
@@ -90,6 +90,22 @@ class SwimlaneModel extends Base
}
/**
+ * Get first active swimlane for a project
+ *
+ * @access public
+ * @param integer $project_id
+ * @return array
+ */
+ public function getFirstActiveSwimlane($project_id)
+ {
+ return $this->db->table(self::TABLE)
+ ->eq('is_active', self::ACTIVE)
+ ->eq('project_id', $project_id)
+ ->orderBy('position', 'asc')
+ ->findOne();
+ }
+
+ /**
* Get default swimlane properties
*
* @access public