Skip to content

Commit f6123f1

Browse files
committed
bug #4031 Update form_events.rst (redstar504)
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
2 parents f5c2602 + d6c8431 commit f6123f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/form/form_events.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Registering an event listener is very easy using the Form component.
1414

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

1919
// ...
2020

@@ -343,7 +343,7 @@ Event subscribers have different uses:
343343
344344
class AddEmailFieldListener implements EventSubscriberInterface
345345
{
346-
public function getSubscribedEvents()
346+
public static function getSubscribedEvents()
347347
{
348348
return array(
349349
FormEvents::PRE_SET_DATA => 'onPreSetData',

0 commit comments

Comments
 (0)