Exemplo n.º 1
0
 /** Get the actual report.
  * Classes  can (but don't have to) override this, but must call the parent's method with what
  * would otherwise be their return value and return that instead.
  * @param $statistics_object Mandatory to give the report it's context
  * @param $child_html The child method's return value
  * @return A html fragment
  */
 public function getReportUI(Statistics $statistics_object, $child_html = null)
 {
     $session = Session::getObject();
     $session->set('current_statistics_object', $statistics_object);
     self::$stats = $statistics_object;
     /* Update it in case someone whants to use it right now */
     $html = '';
     $html .= "<fieldset>";
     $html .= "<legend>" . $this->getGraphName() . "</legend>";
     $errormsg = '';
     if ($this->isAvailable($errormsg)) {
         $html .= "<div><img src='stats_show_graph.php?graph_class=" . get_class($this) . "'></div>";
     } else {
         $html .= $errormsg;
     }
     $html .= $child_html;
     $html .= "</fieldset>";
     return $html;
 }