File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
src/Kris/LaravelFormBuilder/Fields Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,23 @@ public function getAllAttributes()
7171 return $ this ->parent ->getFormHelper ()->mergeAttributes ($ this ->children );
7272 }
7373
74+ /**
75+ * Allow form-specific value alters.
76+ *
77+ * @param array $values
78+ * @return void
79+ */
80+ public function alterFieldValues (array &$ values )
81+ {
82+ foreach ($ this ->children as $ i => $ child ) {
83+ if (method_exists ($ child , 'alterFieldValues ' )) {
84+ if (isset ($ values [$ i ])) {
85+ $ child ->alterFieldValues ($ values [$ i ]);
86+ }
87+ }
88+ }
89+ }
90+
7491 /**
7592 * @inheritdoc
7693 */
Original file line number Diff line number Diff line change @@ -200,21 +200,4 @@ public function getValidationRules()
200200
201201 return $ rules ->append ($ childrenRules );
202202 }
203-
204- /**
205- * Allow form-specific value alters.
206- *
207- * @param array $values
208- * @return void
209- */
210- public function alterFieldValues (array &$ values )
211- {
212- foreach ($ this ->children as $ i => $ child ) {
213- if (method_exists ($ child , 'alterFieldValues ' )) {
214- if (isset ($ values [$ i ])) {
215- $ child ->alterFieldValues ($ values [$ i ]);
216- }
217- }
218- }
219- }
220203}
You can’t perform that action at this time.
0 commit comments