summaryrefslogtreecommitdiff
path: root/app/Model/PredefinedTaskDescriptionModel.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/PredefinedTaskDescriptionModel.php')
-rw-r--r--app/Model/PredefinedTaskDescriptionModel.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/Model/PredefinedTaskDescriptionModel.php b/app/Model/PredefinedTaskDescriptionModel.php
index 7b8e6de2..aaa4d23e 100644
--- a/app/Model/PredefinedTaskDescriptionModel.php
+++ b/app/Model/PredefinedTaskDescriptionModel.php
@@ -13,11 +13,21 @@ class PredefinedTaskDescriptionModel extends Base
return $this->db->table(self::TABLE)->eq('project_id', $projectId)->findAll();
}
+ public function getList($projectId)
+ {
+ return array('' => t('None')) + $this->db->hashtable(self::TABLE)->eq('project_id', $projectId)->getAll('id', 'title');
+ }
+
public function getById($projectId, $id)
{
return $this->db->table(self::TABLE)->eq('project_id', $projectId)->eq('id', $id)->findOne();
}
+ public function getDescriptionById($projectId, $id)
+ {
+ return $this->db->table(self::TABLE)->eq('project_id', $projectId)->eq('id', $id)->findOneColumn('description');
+ }
+
public function create($projectId, $title, $description)
{
return $this->db->table(self::TABLE)->persist(array(