Skip to content

Commit 8d49bfa

Browse files
committed
minor #20859 [Config] Add NodeDefinition::docUrl() (alexandre-daubois)
This PR was merged into the 7.3 branch. Discussion ---------- [Config] Add `NodeDefinition::docUrl()` Fix #20856 Commits ------- 19b99db [Config] Add `NodeDefinition::docUrl()`
2 parents 6c3a18d + 19b99db commit 8d49bfa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

components/config/definition.rst

+24
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,30 @@ and in XML:
546546
<!-- entries-per-page: This value is only used for the search results page. -->
547547
<config entries-per-page="25"/>
548548
549+
You can also provide a URL to a full documentation page::
550+
551+
$rootNode
552+
->docUrl('Full documentation is available at https://example.com/docs/{version:major}.{version:minor}/reference.html')
553+
->children()
554+
->integerNode('entries_per_page')
555+
->defaultValue(25)
556+
->end()
557+
->end()
558+
;
559+
560+
A few placeholders are available to customize the URL:
561+
562+
* ``{version:major}``: The major version of the package currently installed
563+
* ``{version:minor}``: The minor version of the package currently installed
564+
* ``{package}``: The name of the package
565+
566+
The placeholders will be replaced when printing the configuration tree with the
567+
``config:dump-reference`` command.
568+
569+
.. versionadded:: 7.3
570+
571+
The ``docUrl()`` method was introduced in Symfony 7.3.
572+
549573
Optional Sections
550574
-----------------
551575

0 commit comments

Comments
 (0)