Skip to content

Commit

Permalink
feature #6091 Added an example for info() method (javiereguiluz)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Added an example for info() method

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | all
| Fixed tickets | -

This PR just rebases the work made by @OskarStark in #5632.

Commits
-------

f966c0f Fixed another typo
26a8d1f Fixed a typo
9922273 Added an example for info() method
  • Loading branch information
wouterj committed Jan 7, 2016
2 parents def5cc5 + f966c0f commit ff0d917
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()
->integerNode('entries_per_page')
->info('This value is only used for the search results page.')
->defaultValue(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 ff0d917

Please sign in to comment.