\n"; $temp .= $offset." ".htmlspecialchars($this->name)."\n"; foreach($this->styles as $style) { $temp .= $style->generateXml($offset." "); } $temp .= $offset."\n"; return $temp; } /** * creates the html-form-fragment for this object * * @param $id string containing a prefix that should be used to identify this * object's html fields. This must be done, so that the generateObjectFromPost(...) * function can address the fields belonging to this object in the http-post. * * @param string $offset string used for formatting the output * @return string containing the html-form-fragment */ function generateHtmlForm($id, $offset = "") { $temp = ""; $temp .= $offset."\n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset." \n"; $temp .= $offset."
\n"; $temp .= $offset." \n"; $temp .= $offset."   Layer: ".htmlspecialchars($this->name)."\n"; $temp .= $offset." name)."\">\n"; $style_id = 0; foreach ($this->styles as $style) { $temp .= $style->generateHtmlForm($id."_style_".$style_id, $offset." "); $style_id++; } $temp .= $offset."
\n"; return $temp; } /** * populates the member fields of a new object from the data in the http-post-request * to rebuild the object after the submission of the html-form. * * creates its own child objects from the post parameters and calls their * generateObjectFromPost(...) function * * @param string $id string that contains a prefix for the html-form-fields * that is common to all of the fields belonging to this object */ function generateObjectFromPost($id = "") { $this->name = $_REQUEST[$id."_name"]; $countStyles = 0; while (isset($_REQUEST[$id."_style_".$countStyles])) { $style = ""; if ($_REQUEST[$id."_style_".$countStyles] == "userstyle") { $style = new UserStyle(); } else { //Todo evtl: namedstyle erstellen //NamedStyle is currently not supported by UMN-MapServer! //$style = new NamedStyle(); } $style->generateObjectFromPost($id."_style_".$countStyles); $this->styles[] = $style; $countStyles++; } } } ?>