diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-09-08 22:33:16 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-09-08 22:33:16 -0400 |
commit | 75470c72428c8d8f278d160369558ab31b137fb1 (patch) | |
tree | 7fcad6cbc661e2762f1dfa5f643a5beac5217a17 /app/Model | |
parent | fedf4ea2de21fcf95fc5aa942cedc7924865f160 (diff) |
Apply column restrictions to the board
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/ColumnMoveRestrictionModel.php | 17 |
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 |