

Public Member Functions | |
| add ($element, $options=array()) | |
| addButton ($name, $value, $klass="btnPrimary", $extra="", $type="submit") | |
| addCancelButton ($name) | |
| addExpertButton ($name, $value) | |
| addOnClickButton ($text, $url) | |
| addSummary ($msg) | |
| addValidateButton ($name) | |
| begin () | |
| display () | |
| end () | |
| Form ($options=array()) | |
| getButtonString ($name, $value, $klass="btnPrimary", $extra="", $type="submit") | |
| hasBeenPopped () | |
| HtmlContainer () | |
| pop () | |
| push ($element) | |
Data Fields | |
| $debug | |
| $elements | |
| $index | |
| $popped | |
Definition at line 2071 of file PageGenerator.php.
| HtmlContainer::add | ( | $ | element, | |
| $ | options = array() | |||
| ) | [inherited] |
Definition at line 1999 of file PageGenerator.php.
01999 { 02000 $element->setOptions($options); 02001 $this->push($element); 02002 }
| Form::addButton | ( | $ | name, | |
| $ | value, | |||
| $ | klass = "btnPrimary", |
|||
| $ | extra = "", |
|||
| $ | type = "submit" | |||
| ) |
| Form::addCancelButton | ( | $ | name | ) |
Reimplemented in PopupForm.
Definition at line 2108 of file PageGenerator.php.
02108 { 02109 $b = new Button(); 02110 $this->buttons[] = $b->getCancelButtonString($name, "btnSecondary"); 02111 }
| Form::addExpertButton | ( | $ | name, | |
| $ | value | |||
| ) |
Definition at line 2113 of file PageGenerator.php.
02113 { 02114 $d = new DivExpertMode(); 02115 $b = new Button(); 02116 $this->buttons[] = $d->begin() . $b->getButtonString($name, $value) . $d->end(); 02117 }
| Form::addOnClickButton | ( | $ | text, | |
| $ | url | |||
| ) |
Definition at line 2128 of file PageGenerator.php.
02128 { 02129 $b = new Button(); 02130 $this->buttons[] = $b->getOnClickButton($text, $url); 02131 }
| Form::addSummary | ( | $ | msg | ) |
| Form::addValidateButton | ( | $ | name | ) |
Definition at line 2103 of file PageGenerator.php.
02103 { 02104 $b = new Button(); 02105 $this->buttons[] = $b->getValidateButtonString($name); 02106 }
| Form::begin | ( | ) |
Reimplemented from HtmlContainer.
Reimplemented in PopupForm.
Definition at line 2081 of file PageGenerator.php.
02081 { 02082 $str = ""; 02083 foreach($this->options as $key => $value) $str.= " $key=\"$value\""; 02084 $ret = "<form$str>"; 02085 if (isset($this->summary)) { 02086 $ret = "<p>" . $this->summary . "</p>\n" . $ret; 02087 } 02088 return $ret; 02089 }
| HtmlContainer::display | ( | ) | [inherited] |
| Form::end | ( | ) |
Reimplemented from HtmlContainer.
Reimplemented in ValidatingForm, and PopupForm.
Definition at line 2091 of file PageGenerator.php.
02091 { 02092 $str = ""; 02093 foreach($this->buttons as $button) $str .= "\n$button\n"; 02094 $str .= "\n</form>\n"; 02095 return $str; 02096 }
| Form::Form | ( | $ | options = array() |
) |
Definition at line 2073 of file PageGenerator.php.
02073 { 02074 $this->HtmlContainer(); 02075 if (!isset($options["method"])) $options["method"] = "post"; 02076 $this->options = $options; 02077 $this->buttons = array(); 02078 $this->summary = NULL; 02079 }
| Form::getButtonString | ( | $ | name, | |
| $ | value, | |||
| $ | klass = "btnPrimary", |
|||
| $ | extra = "", |
|||
| $ | type = "submit" | |||
| ) |
| HtmlContainer::hasBeenPopped | ( | ) | [inherited] |
Definition at line 2023 of file PageGenerator.php.
02023 { 02024 02025 if ($this->popped) $ret = True; 02026 else if ($this->index == -1) $ret = False; 02027 else $ret = False; 02028 return $ret; 02029 }
| HtmlContainer::HtmlContainer | ( | ) | [inherited] |
Definition at line 1979 of file PageGenerator.php.
01979 { 01980 $this->elements = array(); 01981 $this->popped = False; 01982 $this->index = -1; 01983 }
| HtmlContainer::pop | ( | ) | [inherited] |
Definition at line 2031 of file PageGenerator.php.
02031 { 02032 if (!$this->popped) { 02033 if ($this->index == -1) 02034 $this->popped = True; 02035 else if ($this->elements[$this->index]->hasBeenPopped()) 02036 $this->popped = True; 02037 else $this->elements[$this->index]->pop(); 02038 //if ($this->popped) print "popping " . $this->options["id"] . "<br>"; 02039 } else die("Nothing more to pop"); 02040 }
| HtmlContainer::push | ( | $ | element | ) | [inherited] |
Definition at line 2004 of file PageGenerator.php.
02004 { 02005 if ($this->index == -1) { 02006 /* Add first element to container */ 02007 $this->index++; 02008 $this->elements[$this->index] = $element; 02009 //print "pushing " . $element->options["id"] . " into " . $this->options["id"] . "<br>"; 02010 } else { 02011 if ($this->elements[$this->index]->hasBeenPopped()) { 02012 /* All the contained elements have been popped, so add the new element in the list */ 02013 $this->index++; 02014 $this->elements[$this->index] = $element; 02015 //print "pushing " . $element->options["id"] . " into " . $this->options["id"] . "<br>"; 02016 } else { 02017 /* Recursively push a new element into the container */ 02018 $this->elements[$this->index]->push($element); 02019 } 02020 } 02021 }
HtmlContainer::$debug [inherited] |
Definition at line 1977 of file PageGenerator.php.
HtmlContainer::$elements [inherited] |
Definition at line 1974 of file PageGenerator.php.
HtmlContainer::$index [inherited] |
Definition at line 1975 of file PageGenerator.php.
HtmlContainer::$popped [inherited] |
Definition at line 1976 of file PageGenerator.php.
1.5.8