diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-06-24 15:43:34 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-06-24 15:43:34 -0400 |
commit | 18cb7ad0a4a96be63030f5207b74a195c8b6cd6c (patch) | |
tree | 719898528a9df56f6d8ea4abaee54b9542e3d434 /app/Model/TagModel.php | |
parent | b2e92480c29acb15586bc8ea305c8416927a667c (diff) |
Expose tags to the user interface (first prototype)
Diffstat (limited to 'app/Model/TagModel.php')
-rw-r--r-- | app/Model/TagModel.php | 18 |
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 |