@@ 40-51 (lines=12) @@ | ||
37 | /** |
|
38 | * @inheritdoc |
|
39 | */ |
|
40 | public function configureOptions(OptionsResolver $resolver) |
|
41 | { |
|
42 | $resolver->setRequired(['entityName']); |
|
43 | ||
44 | if ($resolver instanceof OptionsResolver) { |
|
45 | $resolver->setAllowedTypes('entityName', ['string']); |
|
46 | $resolver->setDefined(['entityName']); |
|
47 | $resolver->setDefault('invalid_message', function (Options $options) { |
|
48 | return 'This value is not valid. Unable to find ' . $options['entityName'] . ' in the database.'; |
|
49 | }); |
|
50 | } |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @inheritdoc |
@@ 37-48 (lines=12) @@ | ||
34 | /** |
|
35 | * @inheritdoc |
|
36 | */ |
|
37 | public function configureOptions(OptionsResolver $resolver) |
|
38 | { |
|
39 | $resolver->setRequired(['entityName']); |
|
40 | ||
41 | if ($resolver instanceof OptionsResolver) { |
|
42 | $resolver->setAllowedTypes('entityName', ['string']); |
|
43 | $resolver->setDefined(['entityName']); |
|
44 | $resolver->setDefault('invalid_message', function (Options $options) { |
|
45 | return 'This value is not valid. Unable to find ' . $options['entityName'] . ' in the database.'; |
|
46 | }); |
|
47 | } |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * @inheritdoc |