From 18cb7ad0a4a96be63030f5207b74a195c8b6cd6c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 24 Jun 2016 15:43:34 -0400 Subject: Expose tags to the user interface (first prototype) --- app/Model/TagModel.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'app/Model/TagModel.php') 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 @@ -42,6 +42,24 @@ class TagModel extends Base return $this->db->table(self::TABLE)->eq('project_id', $project_id)->asc('name')->findAll(); } + /** + * 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 * -- cgit v1.2.3