mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Pass the Form & Field instances to the static method used to generate field options
Brings code into line with documentation here: 1015a56294
This commit is contained in:
parent
0718d04a7f
commit
2d6b35b31e
@ -1333,7 +1333,7 @@ class Form extends WidgetBase
|
||||
if (str_contains($fieldOptions, '::')) {
|
||||
$options = explode('::', $fieldOptions);
|
||||
if (count($options) === 2 && class_exists($options[0]) && method_exists($options[0], $options[1])) {
|
||||
$result = $options[0]::{$options[1]}();
|
||||
$result = $options[0]::{$options[1]}($this, $field);
|
||||
if (!is_array($result)) {
|
||||
throw new ApplicationException(Lang::get('backend::lang.field.options_static_method_invalid_value', [
|
||||
'class' => $options[0],
|
||||
|
Loading…
x
Reference in New Issue
Block a user