There are two types of events:
DataEvent - read-only access to the form data. 'Pre' and 'Post' events are read-only.
FilterDataEvent - event that allows the form data to be modified.
form.pre_bind
DataEvent
triggered before data is bound to the form. Triggered by SymfonyComponentFormForm::bind()
form.post_bind
DataEvent
triggered after data is bound to the form. Triggered by SymfonyComponentFormForm::bind()
form.pre_set_data
DataEvent
triggered before fields are filled with default data. Triggered by SymfonyComponentFormForm::setData()
form.post_set_data
DataEvent
triggered after fields are filled with default data. Triggered by SymfonyComponentFormForm::setData()
form.bind_client_data
FilterDataEvent
triggered before data is bound to the form. Triggered by SymfonyComponentFormForm::bind()
form.bind_norm_data
FilterDataEvent
triggered after data has been normalized. Triggered by SymfonyComponentFormForm::bind()
. See SymfonyComponentFormExtensionCoreEventListenerFixUrlProtocolListener
(added by the UrlType
for an example)
form.set_data
FilterDataEvent
triggered while default data is being bound. Triggered by SymfonyComponentFormForm::setData()
I'd recommend poking around the Form class itself to get a better feel for when these events are triggered, and how you can use them.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…