diff options
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 |