| @@ 265-281 (lines=17) @@ | ||
| 262 | * |
|
| 263 | * @return Field|$this |
|
| 264 | */ |
|
| 265 | public function __call($method, $arguments) |
|
| 266 | { |
|
| 267 | if ($className = Form::findFieldClass($method)) { |
|
| 268 | $column = array_get($arguments, 0, ''); |
|
| 269 | ||
| 270 | /** @var Field $field */ |
|
| 271 | $field = new $className($column, array_slice($arguments, 1)); |
|
| 272 | ||
| 273 | $field->setForm($this->parent); |
|
| 274 | ||
| 275 | $this->pushField($field); |
|
| 276 | ||
| 277 | return $field; |
|
| 278 | } |
|
| 279 | ||
| 280 | return $this; |
|
| 281 | } |
|
| 282 | } |
|
| 283 | ||
| @@ 269-280 (lines=12) @@ | ||
| 266 | * |
|
| 267 | * @return Field|null |
|
| 268 | */ |
|
| 269 | public function __call($method, $arguments) |
|
| 270 | { |
|
| 271 | if ($className = static::findFieldClass($method)) { |
|
| 272 | $name = array_get($arguments, 0, ''); |
|
| 273 | ||
| 274 | $element = new $className($name, array_slice($arguments, 1)); |
|
| 275 | ||
| 276 | $this->pushField($element); |
|
| 277 | ||
| 278 | return $element; |
|
| 279 | } |
|
| 280 | } |
|
| 281 | ||
| 282 | /** |
|
| 283 | * Render the form. |
|
| @@ 1376-1387 (lines=12) @@ | ||
| 1373 | * |
|
| 1374 | * @return Field|void |
|
| 1375 | */ |
|
| 1376 | public function __call($method, $arguments) |
|
| 1377 | { |
|
| 1378 | if ($className = static::findFieldClass($method)) { |
|
| 1379 | $column = array_get($arguments, 0, ''); //[0]; |
|
| 1380 | ||
| 1381 | $element = new $className($column, array_slice($arguments, 1)); |
|
| 1382 | ||
| 1383 | $this->pushField($element); |
|
| 1384 | ||
| 1385 | return $element; |
|
| 1386 | } |
|
| 1387 | } |
|
| 1388 | ||
| 1389 | /** |
|
| 1390 | * Render the contents of the form when casting to string. |
|