isValid()) { $this->valid = true; $this->dashboard = $report->getDash(); } $this->process(); } /** * @desc GROUP the dashboard * @return */ public function process() { if ($this->valid) { if (is_null($this->group_dash)) $this->group_dash = array(); foreach ($this->dashboard as $key => $dash) { if (is_object($dash) && $dash instanceof module_report_dashboard_feed && $dash->isValid()) { $onedash = $dash->getDash(); foreach ($onedash as $typeofreport => $value) { if (is_array($value) && sizeof($value) == 0) continue; else { $this->group_dash[$typeofreport][] = $value; } } } else { continue; } } } return; } /** * @desc check if the grouped dash is valid * @return */ public function isValid() { if (isset($this->group_dash) && sizeof($this->group_dash) > 0) { return true; } else { return false; } } /** * @desc return the results * @return */ public function getDash() { return $this->group_dash; } /** * @desc Tri de grouped dash * @return dashboard_merge */ public function tri() { return new module_report_dashboard_merge($this); } }