summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/ColumnMoveRestrictionModel.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/app/Model/ColumnMoveRestrictionModel.php b/app/Model/ColumnMoveRestrictionModel.php
index fa44edd1..63e739bf 100644
--- a/app/Model/ColumnMoveRestrictionModel.php
+++ b/app/Model/ColumnMoveRestrictionModel.php
@@ -42,7 +42,8 @@ class ColumnMoveRestrictionModel extends Base
*/
public function getAll($project_id)
{
- return $this->db->table(self::TABLE)
+ return $this->db
+ ->table(self::TABLE)
->columns(
'restriction_id',
'src_column_id',
@@ -59,6 +60,20 @@ class ColumnMoveRestrictionModel extends Base
}
/**
+ * Get all source column Ids
+ *
+ * @param int $project_id
+ * @return array
+ */
+ public function getAllSrcColumns($project_id)
+ {
+ return $this->db
+ ->hashtable(self::TABLE)
+ ->eq(self::TABLE.'.project_id', $project_id)
+ ->getAll('src_column_id', 'src_column_id');
+ }
+
+ /**
* Create a new column restriction
*
* @param int $project_id