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