/** * @param ConfigureOptionsEvent $event */ public function configureOptions(ConfigureOptionsEvent $event) { $options = $event->getOptions(); $options->setDefaults(['path' => null, 'node_name' => null, 'parent_path' => null, 'auto_create' => false]); $options->setAllowedTypes('path', ['null', 'string']); $options->setAllowedTypes('node_name', ['null', 'string']); $options->setAllowedTypes('parent_path', ['null', 'string']); $options->setAllowedTypes('auto_create', 'bool'); }
/** * @param ConfigureOptionsEvent $event */ public function configureOptions(ConfigureOptionsEvent $event) { $event->getOptions()->setDefaults(['user' => null]); }
public function handleConfigureOptions(ConfigureOptionsEvent $event) { $options = $event->getOptions(); $options->setDefaults(['test.foo' => 'bar']); }
/** * @param ConfigureOptionsEvent $event */ public function configureOptions(ConfigureOptionsEvent $event) { $options = $event->getOptions(); $options->setDefaults(['load_ghost_content' => true, 'clear_missing_content' => false, 'ignore_required' => false]); $options->setAllowedTypes(['load_ghost_content' => 'bool', 'clear_missing_content' => 'bool', 'ignore_required' => 'bool']); }
/** * @param ConfigureOptionsEvent $event */ public function configureOptions(ConfigureOptionsEvent $event) { $options = $event->getOptions(); $options->setDefaults(['type' => null]); }
/** * @param ConfigureOptionsEvent $event */ public function configureOptions(ConfigureOptionsEvent $event) { $options = $event->getOptions(); $options->setDefaults(['load_ghost_content' => true]); $options->setAllowedTypes(['load_ghost_content' => 'bool']); }