\n"; if ($this->wellknownname != "") $temp .= $offset." ".htmlspecialchars($this->wellknownname)."\n"; if ($this->fill != "") $temp .= $this->fill->generateXml($offset." "); if ($this->stroke != "") $temp .= $this->stroke->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." Mark
\n"; $temp .= $offset." \n"; $number = split("_", $id); $number = $number[count($number)-1]; $temp .= $offset." parent."&number=".$number."\">löschen\n"; $temp .= $offset."
\n"; $temp .= $offset." WellKnownName:\n"; $temp .= $offset." \n"; $temp .= $offset."
\n"; //TODO - Zeilenumbruch if ($this->fill != "") { $temp .= $this->fill->generateHtmlForm($id."_fill", $offset." "); } else { $temp .= $offset."id."\">Fill hinzufügen
\n"; } if ($this->stroke != "") { $temp .= $this->stroke->generateHtmlForm($id."_stroke", $offset." "); } else { $temp .= $offset."id."\">Stroke hinzufügen
\n"; } $temp .= $offset."
\n"; $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 = "") { if (isset($_REQUEST[$id."_wellknownname"])) { $this->wellknownname = $_REQUEST[$id."_wellknownname"]; } if (isset($_REQUEST[$id."_fill"])) { $this->fill = new Fill(); $this->fill->generateObjectFromPost($id."_fill"); } if (isset($_REQUEST[$id."_stroke"])) { $this->stroke = new Stroke(); $this->stroke->generateObjectFromPost($id."_stroke"); } } } ?>