view = $view; $this->id = $containerid; foreach ($flags as $type => $value) { if ($type === 'elementId') { $this->elementId = $value; continue; } if ($type === 'refreshInterval') { $this->refreshInterval = intval($type); continue; } if ($type == 'detachable' && $value == true) { $this->features["detachable"] = true; continue; } if ($type == 'expandable' && $value == true) { $this->features["expandable"] = true; continue; } if ($type == "icingaUrl") { $this->url = $value; continue; } if ($type == "iframeFallback") { $this->iframeFallback = true; } if ($type == 'class') { $this->class = $value; continue; } } return $this; } public function beginContent() { ob_start(); return $this; } public function endContent() { $content = ob_get_contents(); ob_end_clean(); return $this->buildDOM($content); } public function buildDOM($content = "") { $additional = ""; if ($this->refreshInterval > 0) $additional .= " container-refresh-interval='{$this->refreshInterval}' "; if ($this->elementId) $additional .= " id='$this->elementId'"; $url = ""; if ($this->url) { $url = $this->view->baseUrl($this->url); $additional .= "icinga-url='{$url}'"; if($this->iframeFallback) { $content = " "; } } $controls = $this->getControlDOM(); $html = "