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. |
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:
Listener for the {@link FormEvents::POSTSETDATA} event.
Listener for the {@link FormEvents::POST_SUBMIT} event.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.1/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.html