summaryrefslogtreecommitdiff
path: root/app/Model/TagModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-24 15:43:34 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-24 15:43:34 -0400
commit18cb7ad0a4a96be63030f5207b74a195c8b6cd6c (patch)
tree719898528a9df56f6d8ea4abaee54b9542e3d434 /app/Model/TagModel.php
parentb2e92480c29acb15586bc8ea305c8416927a667c (diff)
Expose tags to the user interface (first prototype)
Diffstat (limited to 'app/Model/TagModel.php')
-rw-r--r--app/Model/TagModel.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/Model/TagModel.php b/app/Model/TagModel.php
index 1be05a66..8eb5e5ba 100644
--- a/app/Model/TagModel.php
+++ b/app/Model/TagModel.php
@@ -43,6 +43,24 @@ class TagModel extends Base
}
/**
+ * Get assignable tags for a project
+ *
+ * @access public
+ * @param integer $project_id
+ * @return array
+ */
+ public function getAssignableList($project_id)
+ {
+ return $this->db->hashtable(self::TABLE)
+ ->beginOr()
+ ->eq('project_id', $project_id)
+ ->eq('project_id', 0)
+ ->closeOr()
+ ->asc('name')
+ ->getAll('id', 'name');
+ }
+
+ /**
* Get one tag
*
* @access public