Symfony\Component\OptionsResolver\OptionsResolverInterface::setDefaults
Sets default option values.
The options can either be values of any types or closures that evaluate the option value lazily. These closures must have one of the following signatures: <code> function (Options $options) function (Options $options, $value) </code> The second parameter passed to the closure is the previously set default value, in case you are overwriting an existing default value. The closures should return the lazily created option value.
Signature
public function setDefaults(array
$defaultValues )
Parameters
$defaultValues
— array- A list of option names as keys and default
values or closures as values.
Returns
- OptionsResolverInterface
- The resolver instance.