Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff0d917

Browse filesBrowse files
committed
feature symfony#6091 Added an example for info() method (javiereguiluz)
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 symfony#5632. Commits ------- f966c0f Fixed another typo 26a8d1f Fixed a typo 9922273 Added an example for info() method
2 parents def5cc5 + f966c0f commit ff0d917
Copy full SHA for ff0d917

File tree

Expand file treeCollapse file tree

1 file changed

+25
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-0
lines changed

‎components/config/definition.rst

Copy file name to clipboardExpand all lines: components/config/definition.rst
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,34 @@ All options can be documented using the
425425
:method:`Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::info`
426426
method.
427427

428+
.. code-block:: php
429+
430+
$rootNode
431+
->children()
432+
->integerNode('entries_per_page')
433+
->info('This value is only used for the search results page.')
434+
->defaultValue(25)
435+
->end()
436+
->end()
437+
;
438+
428439
The info will be printed as a comment when dumping the configuration tree
429440
with the ``config:dump-reference`` command.
430441

442+
In YAML you may have:
443+
444+
.. code-block:: yaml
445+
446+
# This value is only used for the search results page.
447+
entries_per_page: 25
448+
449+
and in XML:
450+
451+
.. code-block:: xml
452+
453+
<!-- entries-per-page: This value is only used for the search results page. -->
454+
<config entries-per-page="25" />
455+
431456
Optional Sections
432457
-----------------
433458

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.