/**
  * Apply formatter
  *
  * @access public
  * @return array
  */
 public function format()
 {
     $tasks = array_values(array_filter($this->tasks, array($this, 'filterTasks')));
     array_merge_relation($tasks, $this->tags, 'tags', 'id');
     foreach ($tasks as &$task) {
         $task['is_draggable'] = $this->helper->projectRole->isDraggable($task);
     }
     return $tasks;
 }
 /**
  * Get all project roles with restrictions
  *
  * @param  int $project_id
  * @return array
  */
 public function getAllWithRestrictions($project_id)
 {
     $roles = $this->getAll($project_id);
     $column_restrictions = $this->columnRestrictionModel->getAll($project_id);
     $column_restrictions = array_column_index($column_restrictions, 'role_id');
     array_merge_relation($roles, $column_restrictions, 'column_restrictions', 'role_id');
     $column_move_restrictions = $this->columnMoveRestrictionModel->getAll($project_id);
     $column_move_restrictions = array_column_index($column_move_restrictions, 'role_id');
     array_merge_relation($roles, $column_move_restrictions, 'column_move_restrictions', 'role_id');
     $project_restrictions = $this->projectRoleRestrictionModel->getAll($project_id);
     $project_restrictions = array_column_index($project_restrictions, 'role_id');
     array_merge_relation($roles, $project_restrictions, 'project_restrictions', 'role_id');
     return $roles;
 }
 /**
  * Apply formatter
  *
  * @access public
  * @return array
  */
 public function format()
 {
     $tasks = array_values(array_filter($this->tasks, array($this, 'filterTasks')));
     array_merge_relation($tasks, $this->tags, 'tags', 'id');
     return $tasks;
 }