| @@ 167-173 (lines=7) @@ | ||
| 164 | * | |
| 165 | * @return \Anax\HTMLForm\FormElement | |
| 166 | */ | |
| 167 | public function getElement($name) | |
| 168 |     { | |
| 169 |         if (!isset($this->elements[$name])) { | |
| 170 |             throw new Exception("Form element '$name' is not found."); | |
| 171 | } | |
| 172 | return $this->elements[$name]; | |
| 173 | } | |
| 174 | ||
| 175 | ||
| 176 | ||
| @@ 184-191 (lines=8) @@ | ||
| 181 | * | |
| 182 | * @return $this | |
| 183 | */ | |
| 184 | public function removeElement($name) | |
| 185 |     { | |
| 186 |         if (!isset($this->elements[$name])) { | |
| 187 |             throw new Exception("Form element '$name' is not found."); | |
| 188 | } | |
| 189 | unset($this->elements[$name]); | |
| 190 | return $this; | |
| 191 | } | |
| 192 | ||
| 193 | ||
| 194 | ||