/** * Calculates the start and end dates for groups * * Loops through all group members (including members of sub-groups) * and compares start and end dates. */ function calGroupRange() { // calculate start and end dates for groups foreach ($this->data_gantt as $k => $v) { // if element is a group if ($this->data_gantt[$k]["type"] == "G") { // ignore empty groups if ($this->isValidGroup($k)) { // retrieve member information for the group foreach ($this->data_tree[$k] as $member) { switch ($this->data_gantt[$member]["type"]) { case "T": BURAK_Gantt::compareDate($this->data_gantt[$k]["start"], $this->data_gantt[$member]["start"], "<"); BURAK_Gantt::compareDate($this->data_gantt[$k]["end"], $this->data_gantt[$member]["end"], ">"); $this->data_gantt[$k]["count"]++; break; case "M": BURAK_Gantt::compareDate($this->data_gantt[$k]["start"], $this->data_gantt[$member]["start"], "<"); BURAK_Gantt::compareDate($this->data_gantt[$k]["end"], $this->data_gantt[$member]["start"] + 86400, ">"); $this->data_gantt[$k]["count"]++; break; case "G": // ignore empty groups if ($this->isValidGroup($member)) { $this->data_gantt[$k]["count"]++; $this->data_gantt[$k]["count"]++; } break; } } } } } }