From fbf8676ffbf3c30494107f690accc2268237dc14 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 21 Jan 2019 10:18:48 +0100 Subject: [PATCH] Mentioned all the debug:* commands --- form/create_custom_field_type.rst | 9 +++++++++ form/create_form_type_extension.rst | 9 +++++++++ form/type_guesser.rst | 9 +++++++++ reference/forms/types/birthday.rst | 2 ++ reference/forms/types/button.rst | 2 ++ reference/forms/types/checkbox.rst | 2 ++ reference/forms/types/choice.rst | 2 ++ reference/forms/types/collection.rst | 2 ++ reference/forms/types/color.rst | 2 ++ reference/forms/types/country.rst | 2 ++ reference/forms/types/currency.rst | 2 ++ reference/forms/types/date.rst | 2 ++ reference/forms/types/dateinterval.rst | 2 ++ reference/forms/types/datetime.rst | 2 ++ reference/forms/types/email.rst | 2 ++ reference/forms/types/entity.rst | 2 ++ reference/forms/types/file.rst | 2 ++ reference/forms/types/form.rst | 2 ++ reference/forms/types/hidden.rst | 2 ++ reference/forms/types/integer.rst | 2 ++ reference/forms/types/language.rst | 2 ++ reference/forms/types/locale.rst | 2 ++ reference/forms/types/money.rst | 2 ++ reference/forms/types/number.rst | 2 ++ reference/forms/types/options/_debug_form.rst.inc | 9 +++++++++ reference/forms/types/password.rst | 2 ++ reference/forms/types/percent.rst | 2 ++ reference/forms/types/radio.rst | 2 ++ reference/forms/types/range.rst | 2 ++ reference/forms/types/repeated.rst | 2 ++ reference/forms/types/reset.rst | 2 ++ reference/forms/types/search.rst | 2 ++ reference/forms/types/submit.rst | 2 ++ reference/forms/types/tel.rst | 2 ++ reference/forms/types/text.rst | 2 ++ reference/forms/types/textarea.rst | 2 ++ reference/forms/types/time.rst | 2 ++ reference/forms/types/timezone.rst | 2 ++ reference/forms/types/url.rst | 2 ++ setup.rst | 8 +++++++- templating.rst | 7 ++++++- templating/twig_extension.rst | 9 +++++++++ 42 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 reference/forms/types/options/_debug_form.rst.inc diff --git a/form/create_custom_field_type.rst b/form/create_custom_field_type.rst index 2970465cbb4..836fa394a5e 100644 --- a/form/create_custom_field_type.rst +++ b/form/create_custom_field_type.rst @@ -87,6 +87,15 @@ The goal of this field was to extend the choice type to enable selection of the shipping type. This is achieved by fixing the ``choices`` to a list of available shipping options. +.. tip:: + + Run the following command to verify that the form type was successfully + registered in the application: + + .. code-block:: terminal + + $ php bin/console debug:form + Creating a Template for the Field --------------------------------- diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index 1bdd87355b1..90a81f4e2fb 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -81,6 +81,15 @@ Once the extension is registered, any method that you've overridden (e.g. ``buildForm()``) will be called whenever *any* field of the given type (``FileType``) is built. +.. tip:: + + Run the following command to verify that the form type extension was + successfully registered in the application: + + .. code-block:: terminal + + $ php bin/console debug:form + Adding the extension Business Logic ----------------------------------- diff --git a/form/type_guesser.rst b/form/type_guesser.rst index 5c88e75bf45..a9282d79c5c 100644 --- a/form/type_guesser.rst +++ b/form/type_guesser.rst @@ -232,3 +232,12 @@ and tag it with ``form.type_guesser``: ->getFormFactory(); // ... + +.. tip:: + + Run the following command to verify that the form type guesser was + successfullyregistered in the application: + + .. code-block:: terminal + + $ php bin/console debug:form diff --git a/reference/forms/types/birthday.rst b/reference/forms/types/birthday.rst index b7ccf9289cc..3136ed8cdf9 100644 --- a/reference/forms/types/birthday.rst +++ b/reference/forms/types/birthday.rst @@ -50,6 +50,8 @@ option defaults to 120 years ago to the current year. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` | +----------------------+-------------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Overridden Options ------------------ diff --git a/reference/forms/types/button.rst b/reference/forms/types/button.rst index 62e76989a80..8ecd99a8a7a 100644 --- a/reference/forms/types/button.rst +++ b/reference/forms/types/button.rst @@ -19,6 +19,8 @@ A simple, non-responsive button. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType` | +----------------------+----------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Inherited Options ----------------- diff --git a/reference/forms/types/checkbox.rst b/reference/forms/types/checkbox.rst index 7474a51abe1..9814e0306db 100644 --- a/reference/forms/types/checkbox.rst +++ b/reference/forms/types/checkbox.rst @@ -37,6 +37,8 @@ if you want to handle submitted values like "0" or "false"). | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CheckboxType` | +-------------+------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Example Usage ------------- diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index f480c7282a7..6c7dd1ce8ec 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -50,6 +50,8 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType` | +-------------+------------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Example Usage ------------- diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 98d6f09bb4e..63e02bc66be 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -40,6 +40,8 @@ photos). | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType` | +-------------+-----------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + .. note:: If you are working with a collection of Doctrine entities, pay special diff --git a/reference/forms/types/color.rst b/reference/forms/types/color.rst index e6cc5fd8424..db8c5f0365f 100644 --- a/reference/forms/types/color.rst +++ b/reference/forms/types/color.rst @@ -36,6 +36,8 @@ element. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ColorType` | +-------------+---------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Inherited Options ----------------- diff --git a/reference/forms/types/country.rst b/reference/forms/types/country.rst index 6a92d66ad93..ed51d8c023e 100644 --- a/reference/forms/types/country.rst +++ b/reference/forms/types/country.rst @@ -54,6 +54,8 @@ the option manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` | +-------------+-----------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/currency.rst b/reference/forms/types/currency.rst index 8be89439de8..0392bd72d48 100644 --- a/reference/forms/types/currency.rst +++ b/reference/forms/types/currency.rst @@ -46,6 +46,8 @@ manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType` | +-------------+------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index a885ddcf67c..3ed4afdba96 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -47,6 +47,8 @@ and can understand a number of different input formats via the `input`_ option. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateType` | +----------------------+-----------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Basic Usage ----------- diff --git a/reference/forms/types/dateinterval.rst b/reference/forms/types/dateinterval.rst index 1793a9e490f..814aa18f77d 100644 --- a/reference/forms/types/dateinterval.rst +++ b/reference/forms/types/dateinterval.rst @@ -51,6 +51,8 @@ or an array (see `input`_). | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateIntervalType` | +----------------------+----------------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Basic Usage ----------- diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index da182fd7c15..0cdab52e61c 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -56,6 +56,8 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType` | +----------------------+-----------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/email.rst b/reference/forms/types/email.rst index abe66e35614..471f87137c0 100644 --- a/reference/forms/types/email.rst +++ b/reference/forms/types/email.rst @@ -29,6 +29,8 @@ The ``EmailType`` field is a text field that is rendered using the HTML5 | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType` | +-------------+---------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Inherited Options ----------------- diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 9d3d369a720..e99c75b65be 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -54,6 +54,8 @@ objects from the database. | Class | :class:`Symfony\\Bridge\\Doctrine\\Form\\Type\\EntityType` | +-------------+------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Basic Usage ----------- diff --git a/reference/forms/types/file.rst b/reference/forms/types/file.rst index b1f05aa7b3c..e28b52de4d7 100644 --- a/reference/forms/types/file.rst +++ b/reference/forms/types/file.rst @@ -31,6 +31,8 @@ The ``FileType`` represents a file input in your form. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType` | +-------------+---------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Basic Usage ----------- diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index f2540db03f2..933a08ac129 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -46,6 +46,8 @@ on all types for which ``FormType`` is the parent. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType` | +-----------+--------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/hidden.rst b/reference/forms/types/hidden.rst index e211c526f63..a5d5b6315ef 100644 --- a/reference/forms/types/hidden.rst +++ b/reference/forms/types/hidden.rst @@ -23,6 +23,8 @@ The hidden type represents a hidden input field. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType` | +-------------+----------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Overridden Options ------------------ diff --git a/reference/forms/types/integer.rst b/reference/forms/types/integer.rst index c203701d896..1c35c581f08 100644 --- a/reference/forms/types/integer.rst +++ b/reference/forms/types/integer.rst @@ -42,6 +42,8 @@ integers. By default, all non-integer values (e.g. 6.78) will round down | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\IntegerType` | +-------------+-----------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/language.rst b/reference/forms/types/language.rst index 86866c871c8..244cea352b5 100644 --- a/reference/forms/types/language.rst +++ b/reference/forms/types/language.rst @@ -56,6 +56,8 @@ manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` | +-------------+------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/locale.rst b/reference/forms/types/locale.rst index 7c3dc1e3b55..dca67366178 100644 --- a/reference/forms/types/locale.rst +++ b/reference/forms/types/locale.rst @@ -57,6 +57,8 @@ manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType` | +-------------+------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index a82e0eee3d9..dafa34543e2 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -43,6 +43,8 @@ how the input and output of the data is handled. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\MoneyType` | +-------------+---------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index e0f61e12ab8..0726f0a971d 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -38,6 +38,8 @@ that you want to use for your number. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType` | +-------------+----------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/options/_debug_form.rst.inc b/reference/forms/types/options/_debug_form.rst.inc new file mode 100644 index 00000000000..8db828a9236 --- /dev/null +++ b/reference/forms/types/options/_debug_form.rst.inc @@ -0,0 +1,9 @@ +.. tip:: + + The full list of options defined and inherited by this form type is + available running this command in your app: + + .. code-block:: terminal + + # replace 'FooType' by the class name of your form type + $ php bin/console debug:form FooType diff --git a/reference/forms/types/password.rst b/reference/forms/types/password.rst index 69393d69a80..ecf209757c1 100644 --- a/reference/forms/types/password.rst +++ b/reference/forms/types/password.rst @@ -31,6 +31,8 @@ The ``PasswordType`` field renders an input password text box. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType` | +-------------+------------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/percent.rst b/reference/forms/types/percent.rst index 87a714e069b..b4bba6f12fc 100644 --- a/reference/forms/types/percent.rst +++ b/reference/forms/types/percent.rst @@ -40,6 +40,8 @@ This field adds a percentage sign "``%``" after the input box. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\PercentType` | +-------------+-----------------------------------------------------------------------+ +.. include:: /reference/forms/types/options/_debug_form.rst.inc + Field Options ------------- diff --git a/reference/forms/types/radio.rst b/reference/forms/types/radio.rst index 10ea257b87d..74a0d461702 100644 --- a/reference/forms/types/radio.rst +++ b/reference/forms/types/radio.rst @@ -40,6 +40,8 @@ If you want to have a boolean field, use :doc:`CheckboxType ` and do a -few other project-specific tasks (e.g. creating database schema). +few other project-specific tasks (e.g. creating database schema). When working +on a existing Symfony app for the first time, it may be useful to run this +command which displays information about the app: + +.. code-block:: terminal + + $ php bin/console about Checking for Security Vulnerabilities ------------------------------------- diff --git a/templating.rst b/templating.rst index e89dc2d6692..71e5f5385d4 100644 --- a/templating.rst +++ b/templating.rst @@ -98,7 +98,12 @@ it: Twig comes with a long list of `tags`_, `filters`_ and `functions`_ that are available by default. You can even add your own *custom* filters, functions (and more) via -a :doc:`Twig Extension `. +a :doc:`Twig Extension `. Run the following command +to list them all: + +.. code-block:: terminal + + $ php bin/console debug:twig Twig code will look similar to PHP code, with subtle, nice differences. The following example uses a standard ``for`` tag and the ``cycle()`` function to print ten div tags, diff --git a/templating/twig_extension.rst b/templating/twig_extension.rst index 51ac186c4cf..ac2128bd2a9 100644 --- a/templating/twig_extension.rst +++ b/templating/twig_extension.rst @@ -103,6 +103,15 @@ successfully registered: You can now start using your filter in any Twig template. +.. tip:: + + Run the following command to verify that the filters and functions created + by your extensions are successfully registered: + + .. code-block:: terminal + + $ php bin/console debug:twig + .. _lazy-loaded-twig-extensions: Creating Lazy-Loaded Twig Extensions