@@ -84,7 +84,7 @@ public function getDecoratedFactory()
84
84
*/
85
85
public function createListFromChoices ($ choices , $ value = null )
86
86
{
87
- if (is_string ($ value )) {
87
+ if (is_string ($ value ) && ! is_callable ( $ value ) ) {
88
88
$ value = new PropertyPath ($ value );
89
89
}
90
90
@@ -134,7 +134,7 @@ public function createListFromFlippedChoices($choices, $value = null)
134
134
*/
135
135
public function createListFromLoader (ChoiceLoaderInterface<
10000
/span> $ loader , $ value = null )
136
136
{
137
- if (is_string ($ value )) {
137
+ if (is_string ($ value ) && ! is_callable ( $ value ) ) {
138
138
$ value = new PropertyPath ($ value );
139
139
}
140
140
@@ -164,7 +164,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
164
164
{
165
165
$ accessor = $ this ->propertyAccessor ;
166
166
167
- if (is_string ($ label )) {
167
+ if (is_string ($ label ) && ! is_callable ( $ label ) ) {
168
168
$ label = new PropertyPath ($ label );
169
169
}
170
170
@@ -174,7 +174,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
174
174
};
175
175
}
176
176
177
- if (is_string ($ preferredChoices )) {
177
+ if (is_string ($ preferredChoices ) && ! is_callable ( $ preferredChoices ) ) {
178
178
$ preferredChoices = new PropertyPath ($ preferredChoices );
179
179
}
180
180
@@ -189,7 +189,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
189
189
};
190
190
}
191
191
192
- if (is_string ($ index )) {
192
+ if (is_string ($ index ) && ! is_callable ( $ index ) ) {
193
193
$ index = new PropertyPath ($ index );
194
194
}
195
195
@@ -199,7 +199,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
199
199
};
200
200
}
201
201
202
- if (is_string ($ groupBy )) {
202
+ if (is_string ($ groupBy ) && ! is_callable ( $ groupBy ) ) {
203
203
$ groupBy = new PropertyPath ($ groupBy );
204
204
}
205
205
@@ -213,7 +213,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
213
213
};
214
214
}
215
215
216
- if (is_string ($ attr )) {
216
+ if (is_string ($ attr ) && ! is_callable ( $ attr ) ) {
217
217
$ attr = new PropertyPath ($ attr );
218
218
}
219
219
0 commit comments