Apply column restrictions to the board

This commit is contained in:
Frederic Guillot
2016-09-08 22:33:16 -04:00
parent fedf4ea2de
commit 75470c7242
14 changed files with 383 additions and 169 deletions

View File

@@ -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',
@@ -58,6 +59,20 @@ class ColumnMoveRestrictionModel extends Base
->findAll();
}
/**
* 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
*