Skip to content

Commit

Permalink
bug #4031 Update form_events.rst (redstar504)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #4031).

Discussion
----------

Update form_events.rst

EventSubscriberInterface::getSubscribedEvents() method is static.

Commits
-------

a716a28 Update form_events.rst
229cde3 Update form_events.rst
  • Loading branch information
weaverryan committed Jul 28, 2014
2 parents f5c2602 + d6c8431 commit f6123f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/form/form_events.rst
Expand Up @@ -14,7 +14,7 @@ Registering an event listener is very easy using the Form component.


For example, if you wish to register a function to the For example, if you wish to register a function to the
``FormEvents::PRE_SUBMIT`` event, the following code lets you add a field, ``FormEvents::PRE_SUBMIT`` event, the following code lets you add a field,
depending on the request' values:: depending on the request values::


// ... // ...


Expand Down Expand Up @@ -343,7 +343,7 @@ Event subscribers have different uses:
class AddEmailFieldListener implements EventSubscriberInterface class AddEmailFieldListener implements EventSubscriberInterface
{ {
public function getSubscribedEvents() public static function getSubscribedEvents()
{ {
return array( return array(
FormEvents::PRE_SET_DATA => 'onPreSetData', FormEvents::PRE_SET_DATA => 'onPreSetData',
Expand Down

0 comments on commit f6123f1

Please sign in to comment.