| @@ 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. |
|
| @@ 738-749 (lines=12) @@ | ||
| 735 | * |
|
| 736 | * @return Field|void |
|
| 737 | */ |
|
| 738 | public function __call($method, $arguments) |
|
| 739 | { |
|
| 740 | if ($className = static::findFieldClass($method)) { |
|
| 741 | $column = array_get($arguments, 0, ''); //[0]; |
|
| 742 | ||
| 743 | $element = new $className($column, array_slice($arguments, 1)); |
|
| 744 | ||
| 745 | $this->pushField($element); |
|
| 746 | ||
| 747 | return $element; |
|
| 748 | } |
|
| 749 | } |
|
| 750 | ||
| 751 | public static function findFieldClass($method) |
|
| 752 | { |
|