From a4ad744041a58c303f7563795828a4dd78b11b0f Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 29 Nov 2015 01:05:33 +0100 Subject: [PATCH] Use path() and url() PHP templating helpers --- book/forms.rst | 4 ++- book/from_flat_php_to_symfony2.rst | 2 +- book/http_cache.rst | 13 ++++--- book/routing.rst | 25 +++++++------ book/templating.rst | 45 ++++++++++++++---------- cookbook/security/csrf_in_login_form.rst | 4 ++- cookbook/security/form_login.rst | 4 ++- cookbook/security/form_login_setup.rst | 4 ++- cookbook/security/impersonating_user.rst | 10 +++--- cookbook/security/remember_me.rst | 4 ++- cookbook/templating/PHP.rst | 4 +-- 11 files changed, 71 insertions(+), 48 deletions(-) diff --git a/book/forms.rst b/book/forms.rst index 7ee7bff700d..504cc8a7ed6 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1036,7 +1036,9 @@ to the ``form()`` or the ``form_start()`` helper: start($form, array( - 'action' => $view['router']->generate('target_route'), + // The path() method was introduced in Symfony 2.8. Prior to 2.8, + // you had to use generate(). + 'action' => $view['router']->path('target_route'), 'method' => 'GET', )) ?> diff --git a/book/from_flat_php_to_symfony2.rst b/book/from_flat_php_to_symfony2.rst index d243b390434..5420a31ea1b 100644 --- a/book/from_flat_php_to_symfony2.rst +++ b/book/from_flat_php_to_symfony2.rst @@ -598,7 +598,7 @@ database and the Templating component to render a template and return a