| @@ 238-249 (lines=12) @@ | ||
| 235 | * |
|
| 236 | * @return Field|null |
|
| 237 | */ |
|
| 238 | public function __call($method, $arguments) |
|
| 239 | { |
|
| 240 | if ($className = static::findFieldClass($method)) { |
|
| 241 | $name = array_get($arguments, 0, ''); |
|
| 242 | ||
| 243 | $element = new $className($name, array_slice($arguments, 1)); |
|
| 244 | ||
| 245 | $this->pushField($element); |
|
| 246 | ||
| 247 | return $element; |
|
| 248 | } |
|
| 249 | } |
|
| 250 | ||
| 251 | /** |
|
| 252 | * Render the form. |
|
| @@ 843-854 (lines=12) @@ | ||
| 840 | * |
|
| 841 | * @return Field|void |
|
| 842 | */ |
|
| 843 | public function __call($method, $arguments) |
|
| 844 | { |
|
| 845 | if ($className = static::findFieldClass($method)) { |
|
| 846 | $column = array_get($arguments, 0, ''); //[0]; |
|
| 847 | ||
| 848 | $element = new $className($column, array_slice($arguments, 1)); |
|
| 849 | ||
| 850 | $this->pushField($element); |
|
| 851 | ||
| 852 | return $element; |
|
| 853 | } |
|
| 854 | } |
|
| 855 | ||
| 856 | public static function findFieldClass($method) |
|
| 857 | { |
|