Skip to content

Commit

Permalink
Added an example for info() method
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Dec 30, 2015
1 parent e14e194 commit 9922273
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<!-- entries-per-page: This value is only used for the search results page. -->
<config entries-per-page="25" />
Optional Sections
-----------------

Expand Down

0 comments on commit 9922273

Please sign in to comment.