Skip to content

Commit

Permalink
minor #6586 6338 use csrfManager instead of csrfProvider (snoek09)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.7 branch (closes #6586).

Discussion
----------

6338 use csrfManager instead of csrfProvider

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.7
| Fixed tickets | #6338

Commits
-------

500dce5 6338 use csrfManager instead of csrfProvider
  • Loading branch information
xabbuh committed May 21, 2016
2 parents 2038123 + 500dce5 commit f9edfd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/form/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,12 @@ to bootstrap or access Twig and add the :class:`Symfony\\Bridge\\Twig\\Extension
)));
$formEngine = new TwigRendererEngine(array($defaultFormTheme));
$formEngine->setEnvironment($twig);

// ... (see the previous CSRF Protection section for more information)

// add the FormExtension to Twig
$twig->addExtension(
new FormExtension(new TwigRenderer($formEngine, $csrfProvider))
new FormExtension(new TwigRenderer($formEngine, $csrfManager))
);

// create your form factory as normal
Expand Down

0 comments on commit f9edfd5

Please sign in to comment.