From 9922273e7ed4156961147aa446248185852b74a4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 09:07:01 +0100 Subject: [PATCH 1/3] Added an example for info() method --- components/config/definition.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/components/config/definition.rst b/components/config/definition.rst index a6a6f908fa7..4353f73b015 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -425,9 +425,34 @@ All options can be documented using the :method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::info` method. +.. code-block:: php + + $rootNode + ->children() + ->inetegerNode('entries_per_page') + ->info('This value is only used for the search results page.') + ->devaultValue(25) + ->end() + ->end() + ; + The info will be printed as a comment when dumping the configuration tree with the ``config:dump-reference`` command. +In YAML you may have: + +.. code-block:: yaml + + # This value is only used for the search results page. + entries_per_page: 25 + +and in XML: + +.. code-block:: xml + + + + Optional Sections ----------------- From 26a8d1f47b57b56d82af160da499aacab989e81b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 18:06:22 +0100 Subject: [PATCH 2/3] Fixed a typo --- components/config/definition.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index 4353f73b015..f55d4ba1a06 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -431,7 +431,7 @@ method. ->children() ->inetegerNode('entries_per_page') ->info('This value is only used for the search results page.') - ->devaultValue(25) + ->defaultValue(25) ->end() ->end() ; From f966c0f01386a7275646f9e2f34fa77c49e3e0f9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 18:12:33 +0100 Subject: [PATCH 3/3] Fixed another typo --- components/config/definition.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index f55d4ba1a06..a83757dff68 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -429,7 +429,7 @@ method. $rootNode ->children() - ->inetegerNode('entries_per_page') + ->integerNode('entries_per_page') ->info('This value is only used for the search results page.') ->defaultValue(25) ->end()