@@ -57,15 +57,9 @@ as integration of other related components:
5757Using the Bundle Extension
5858--------------------------
5959
60- The basic idea is that instead of having the user override individual
61- parameters, you let the user configure just a few, specifically created,
62- options. As the bundle developer, you then parse through that configuration and
63- load correct services and parameters inside an "Extension" class.
64-
65- As an example, imagine you are creating a social bundle, which provides
66- integration with Twitter and such. To be able to reuse your bundle, you have to
67- make the ``client_id `` and ``client_secret `` variables configurable. Your
68- bundle configuration would look like:
60+ Imagine you are creating a new bundle - AcmeSocialBundle - which provides
61+ integration with Twitter, etc. To make your bundle easy to use, you want to
62+ allow users to configure it with some configuration that looks like this:
6963
7064.. configuration-block ::
7165
@@ -102,12 +96,16 @@ bundle configuration would look like:
10296 'client_secret' => 'your_secret',
10397 ));
10498
99+ The basic idea is that instead of having the user override individual
100+ parameters, you let the user configure just a few, specifically created,
101+ options. As the bundle developer, you then parse through that configuration and
102+ load correct services and parameters inside an "Extension" class.
105103
106- .. tip ::
104+ .. note ::
107105
108- The root node of your bundle configuration must match the name of your
109- bundle without the 'Bundle' suffix in camel case. For example
110- `` AcmeSocialBundle `` becomes `` acme_social `` .
106+ The root key of your bundle configuration (`` acme_social `` in the previous
107+ example) is automatically determined from your bundle name (it's the
108+ `snake case `_ of the bundle name without the `` Bundle `` suffix ) .
111109
112110.. seealso ::
113111
@@ -446,3 +444,4 @@ Assuming the XSD file is called ``hello-1.0.xsd``, the schema location will be
446444.. _`TwigBundle Configuration` : https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
447445.. _`XML namespace` : https://en.wikipedia.org/wiki/XML_namespace
448446.. _`XML schema` : https://en.wikipedia.org/wiki/XML_schema
447+ .. _`snake case` : https://en.wikipedia.org/wiki/Snake_case
0 commit comments