class DataCollectorListener implements EventSubscriberInterface
Listener that invokes a data collector for the {@link FormEvents::POSTSETDATA} and {@link FormEvents::POST_SUBMIT} events.
__construct(FormDataCollectorInterface $dataCollector) | ||
static array | getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. | |
postSetData(FormEvent $event) Listener for the {@link FormEvents::POSTSETDATA} event. | ||
postSubmit(FormEvent $event) Listener for the {@link FormEvents::POST_SUBMIT} event. |
FormDataCollectorInterface | $dataCollector |
Returns an array of event names this subscriber wants to listen to.
The array keys are event names and the value can be:
For instance:
array | The event names to listen to |
Listener for the {@link FormEvents::POSTSETDATA} event.
FormEvent | $event |
Listener for the {@link FormEvents::POST_SUBMIT} event.
FormEvent | $event |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.html