From 2a3dc8d414a8f5a4e06de2904ce35542aa1a2d52 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Fri, 23 Nov 2012 22:10:07 +0100 Subject: [PATCH] Changed wrong argument names in Twig As twig will support named arguments soon --- reference/forms/twig_reference.rst | 20 ++++++++++---------- reference/twig_reference.rst | 16 ++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/reference/forms/twig_reference.rst b/reference/forms/twig_reference.rst index 97bc2e34c83..d37123a4249 100644 --- a/reference/forms/twig_reference.rst +++ b/reference/forms/twig_reference.rst @@ -11,8 +11,8 @@ widgets, etc). .. _reference-forms-twig-label: -form_label(form.name, label, variables) ---------------------------------------- +form_label(view, label, variables) +---------------------------------- Renders the label for the given field. You can optionally pass the specific label you want to display as the second argument. @@ -30,8 +30,8 @@ argument. .. _reference-forms-twig-errors: -form_errors(form.name) ----------------------- +form_errors(view) +----------------- Renders any errors for the given field. @@ -44,8 +44,8 @@ Renders any errors for the given field. .. _reference-forms-twig-widget: -form_widget(form.name, variables) ---------------------------------- +form_widget(view, variables) +---------------------------- Renders the HTML widget of a given field. If you apply this to an entire form or collection of fields, each underlying form row will be rendered. @@ -67,8 +67,8 @@ argument. .. _reference-forms-twig-row: -form_row(form.name, variables) ------------------------------- +form_row(view, variables) +------------------------- Renders the "row" of a given field, which is the combination of the field's label, errors and widget. @@ -87,7 +87,7 @@ argument. .. _reference-forms-twig-rest: -form_rest(form, variables) +form_rest(view, variables) -------------------------- This renders all fields that have not yet been rendered for the given form. @@ -101,7 +101,7 @@ obvious (since it'll render the field for you). .. _reference-forms-twig-enctype: -form_enctype(form) +form_enctype(view) ------------------ If the form contains at least one file upload field, this will render the diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index dd6aeac2d0a..a662d98e8ea 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -26,28 +26,28 @@ Functions | ``asset_version(packageName = null)`` | Get the current version of the package, more information in | | | ":ref:`book-templating-assets`". | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``form_enctype(form)`` | This will render the required ``enctype="multipart/form-data"`` attribute | +| ``form_enctype(view)`` | This will render the required ``enctype="multipart/form-data"`` attribute | | | if the form contains at least one file upload field, more information in | | | in :ref:`the Twig Form reference`. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``form_widget(form, variables = {})`` | This will render a complete form or a specific HTML widget of a field, | +| ``form_widget(view, variables = {})`` | This will render a complete form or a specific HTML widget of a field, | | | more information in :ref:`the Twig Form reference`. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``form_errors(form)`` | This will render any errors for the given field or the "global" errors, | +| ``form_errors(view)`` | This will render any errors for the given field or the "global" errors, | | | more information in :ref:`the Twig Form reference`. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``form_label(form, label = null, variables = {})`` | This will render the label for the given field, more information in | +| ``form_label(view, label = null, variables = {})`` | This will render the label for the given field, more information in | | | :ref:`the Twig Form reference`. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``form_row(form, variables = {})`` | This will render the row (the field's label, errors and widget) of the | +| ``form_row(view, variables = {})`` | This will render the row (the field's label, errors and widget) of the | | | given field, more information in :ref:`the Twig Form reference`. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``form_rest(form, variables = {})`` | This will render all fields that have not yet been rendered, more | +| ``form_rest(view, variables = {})`` | This will render all fields that have not yet been rendered, more | | | information in :ref:`the Twig Form reference`. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ | ``_form_is_choice_group(label)`` | This will return ``true`` if the label is a choice group. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ -| ``_form_is_choice_selected(form, choice)`` | This will return ``true`` if the given choice is selected. | +| ``_form_is_choice_selected(view, choice)`` | This will return ``true`` if the given choice is selected. | +----------------------------------------------------+--------------------------------------------------------------------------------------------+ | ``is_granted(role, object = null, field = null)`` | This will return ``true`` if the current user has the required role, more | | | information in ":ref:`book-security-template`" | @@ -87,7 +87,7 @@ Filters +---------------------------------------------------------------------------------+-------------------------------------------------------------------+ | ``path|file_excerpt(line)`` | This will render an excerpt of a code file around the given line. | +---------------------------------------------------------------------------------+-------------------------------------------------------------------+ -| ``path|format_file(line, text)`` | This will render a file path in a link. | +| ``path|format_file(line, text = null)`` | This will render a file path in a link. | +---------------------------------------------------------------------------------+-------------------------------------------------------------------+ | ``exceptionMessage|format_file_from_text`` | Equal to ``format_file`` except it parsed the default PHP error | | | string into a file path (i.e. 'in foo.php on line 45') |