File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,26 +25,6 @@ class SelectElement extends BaseFormElement
2525 /** @var array|string Array when the attribute `multiple` is set to true, string otherwise */
2626 protected $ value ;
2727
28- public function getValueAttribute ()
29- {
30- // select elements don't have a value attribute
31- return null ;
32- }
33-
34- public function getNameAttribute ()
35- {
36- $ name = $ this ->getName ();
37-
38- return $ this ->isMultiple () ? ($ name . '[] ' ) : $ name ;
39- }
40-
41- public function getValue ()
42- {
43- $ value = parent ::getValue ();
44-
45- return $ this ->isMultiple () ? (array ) $ value : $ value ;
46- }
47-
4828 /**
4929 * Get the option with specified value
5030 *
@@ -81,6 +61,26 @@ public function setOptions(array $options): self
8161 return $ this ;
8262 }
8363
64+ public function getValue ()
65+ {
66+ $ value = parent ::getValue ();
67+
68+ return $ this ->isMultiple () ? (array ) $ value : $ value ;
69+ }
70+
71+ public function getValueAttribute ()
72+ {
73+ // select elements don't have a value attribute
74+ return null ;
75+ }
76+
77+ public function getNameAttribute ()
78+ {
79+ $ name = $ this ->getName ();
80+
81+ return $ this ->isMultiple () ? ($ name . '[] ' ) : $ name ;
82+ }
83+
8484 /**
8585 * Make the selectOption for the specified value and the label
8686 *
You can’t perform that action at this time.
0 commit comments