@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | 'delete' => [], |
46 | 46 | ]) |
47 | 47 | ->setAllowedTypes('list_actions', 'array') |
48 | - ->setNormalizer('list_actions', function (Options $options, $value) { |
|
48 | + ->setNormalizer('list_actions', function(Options $options, $value) { |
|
49 | 49 | foreach ($value as $actionName => $actionConfiguration) { |
50 | 50 | $value[$actionName] = LinkNormalizer::normalize( |
51 | 51 | $actionConfiguration, |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | 'create' => [], |
62 | 62 | ]) |
63 | 63 | ->setAllowedTypes('item_actions', 'array') |
64 | - ->setNormalizer('item_actions', function (Options $options, $value) { |
|
64 | + ->setNormalizer('item_actions', function(Options $options, $value) { |
|
65 | 65 | foreach ($value as $actionName => $actionConfiguration) { |
66 | 66 | $value[$actionName] = LinkNormalizer::normalize( |
67 | 67 | $actionConfiguration, |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | |
308 | 308 | private function getTitleNormalizer(): Closure |
309 | 309 | { |
310 | - return function (Options $options, $value) { |
|
310 | + return function(Options $options, $value) { |
|
311 | 311 | if ($value === null) { |
312 | 312 | $value = u($options->offsetGet('name'))->camel()->title()->toString(); |
313 | 313 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | private function getTemplateNormalizer(): Closure |
320 | 320 | { |
321 | - return function (Options $options, $value) { |
|
321 | + return function(Options $options, $value) { |
|
322 | 322 | $map = [ |
323 | 323 | 'create' => '@LAGAdmin/crud/create.html.twig', |
324 | 324 | 'update' => '@LAGAdmin/crud/update.html.twig', |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | private function getPathNormalizer(): Closure |
341 | 341 | { |
342 | - return function (Options $options, $value) { |
|
342 | + return function(Options $options, $value) { |
|
343 | 343 | if ($value !== null) { |
344 | 344 | $path = u($value); |
345 | 345 | |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | */ |
399 | 399 | private function getFieldsNormalizer(): Closure |
400 | 400 | { |
401 | - return function (Options $options, $fields) { |
|
401 | + return function(Options $options, $fields) { |
|
402 | 402 | $normalizedFields = []; |
403 | 403 | |
404 | 404 | foreach ($fields as $name => $field) { |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | private function getOrderNormalizer(): Closure |
420 | 420 | { |
421 | - return function (Options $options, $order) { |
|
421 | + return function(Options $options, $order) { |
|
422 | 422 | foreach ($order as $field => $sort) { |
423 | 423 | if (!\is_string($sort) || !\is_string($field) || !\in_array(strtolower($sort), ['asc', 'desc'])) { |
424 | 424 | throw new Exception('Order value should be an array of string (["field" => $key]), got '.\gettype($sort)); |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | |
432 | 432 | private function getLoadStrategyNormalizer(): Closure |
433 | 433 | { |
434 | - return function (Options $options, $value) { |
|
434 | + return function(Options $options, $value) { |
|
435 | 435 | if ($value !== null) { |
436 | 436 | return $value; |
437 | 437 | } |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | */ |
455 | 455 | private function getCriteriaNormalizer(): Closure |
456 | 456 | { |
457 | - return function (Options $options, $value) { |
|
457 | + return function(Options $options, $value) { |
|
458 | 458 | if (!$value) { |
459 | 459 | $idActions = [ |
460 | 460 | 'update', |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | */ |
478 | 478 | private function getFiltersNormalizer(): Closure |
479 | 479 | { |
480 | - return function (Options $options, $data) { |
|
480 | + return function(Options $options, $data) { |
|
481 | 481 | $normalizedData = []; |
482 | 482 | |
483 | 483 | foreach ($data as $name => $field) { |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | |
504 | 504 | private function getRouteParametersNormalizer(): Closure |
505 | 505 | { |
506 | - return function (Options $options, $value) { |
|
506 | + return function(Options $options, $value) { |
|
507 | 507 | if (\count($value) > 0) { |
508 | 508 | return $value; |
509 | 509 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | private function getLinkedActionsNormalizer(): Closure |
520 | 520 | { |
521 | - return function (Options $options, $value) { |
|
521 | + return function(Options $options, $value) { |
|
522 | 522 | $actions = array_keys($options->offsetGet('actions')); |
523 | 523 | |
524 | 524 | foreach ($value as $actionName) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | 'template' => '@LAGAdmin/fields/action-collection.html.twig', |
23 | 23 | 'actions' => [], |
24 | 24 | ]) |
25 | - ->setNormalizer('actions', function (Options $options, $value) { |
|
25 | + ->setNormalizer('actions', function(Options $options, $value) { |
|
26 | 26 | if (!\is_array($value) || 0 === \count($value)) { |
27 | 27 | $value = [ |
28 | 28 | 'update' => [], |