Skip to content

Changed wrong argument names #1950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions reference/forms/twig_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -30,8 +30,8 @@ argument.

.. _reference-forms-twig-errors:

form_errors(form.name)
----------------------
form_errors(view)
-----------------

Renders any errors for the given field.

Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions reference/twig_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| | :ref:`reference-forms-twig-enctype`. |
+-----------------------------------------------------+---------------------------------------------------------------------------+
| ``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:`reference-forms-twig-widget`. |
+-----------------------------------------------------+---------------------------------------------------------------------------+
| ``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:`reference-forms-twig-errors`. |
+-----------------------------------------------------+---------------------------------------------------------------------------+
| ``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:`reference-forms-twig-label`. |
+-----------------------------------------------------+---------------------------------------------------------------------------+
| ``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:`reference-forms-twig-row`. |
+-----------------------------------------------------+---------------------------------------------------------------------------+
| ``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:`reference-forms-twig-rest`. |
+-----------------------------------------------------+---------------------------------------------------------------------------+
| ``_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` |
Expand Down Expand Up @@ -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') |
Expand Down