Esempio n. 1
0
 /**
  * Inject info about links with parent tasks (in terms of project dependence).
  * This data is used when gantt is shown. To get dependent tasks, use the other function.
  * 
  * Unsure about this function, so access private currently
  * 
  * @access private
  */
 private static function injectIngoingDependenceFields(array $parameters, array &$data, array &$can)
 {
     // task join here?
     $res = DependenceTable::getListByLegacyTaskFilter($parameters['LIST_PARAMETERS']['FILTER'], array('select' => array('DEPENDS_ON_ID', 'TYPE', 'TASK_ID')));
     while ($item = $res->fetch()) {
         if (isset($data[$item['TASK_ID']])) {
             $taskId = $item['TASK_ID'];
             unset($item['TASK_ID']);
             $dependsOnId = $item['DEPENDS_ON_ID'];
             unset($item['DEPENDS_ON_ID']);
             $data[$taskId]['INGOING_DEPENDECE_ID'][$dependsOnId] = $item;
         }
     }
 }