From ad831bcb8953581dea70f75dd67c00c0da24d5d8 Mon Sep 17 00:00:00 2001 From: John Kary Date: Mon, 18 Feb 2013 23:19:06 -0600 Subject: [PATCH 1/4] Fix naming of __construct() --- cookbook/bundles/extension.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index 32c837b333e..acbae68f245 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -494,7 +494,7 @@ be output to the console in yaml. As long as your bundle's configuration is located in the standard location (``YourBundle\DependencyInjection\Configuration``) and does not have a -``__constructor()`` it will work automatically. If you have a something +``__construct()`` it will work automatically. If you have a something different your ``Extension`` class will have to override the ``Extension::getConfiguration()`` method. Have it return an instance of your ``Configuration``. From 6f710622f012868dfa866efb668def2d1101bd13 Mon Sep 17 00:00:00 2001 From: John Kary Date: Mon, 18 Feb 2013 23:25:20 -0600 Subject: [PATCH 2/4] Improve readability --- cookbook/bundles/extension.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index acbae68f245..d7d062f5901 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -494,9 +494,9 @@ be output to the console in yaml. As long as your bundle's configuration is located in the standard location (``YourBundle\DependencyInjection\Configuration``) and does not have a -``__construct()`` it will work automatically. If you have a something -different your ``Extension`` class will have to override the -``Extension::getConfiguration()`` method. Have it return an instance of your +``__construct()`` it will work automatically. If you have something +different, your ``Extension`` class must override the +``Extension::getConfiguration()`` method and return an instance of your ``Configuration``. Comments and examples can be added to your configuration nodes using the From 12b8be368abe9b76c9a66d459e9faaf40c98e920 Mon Sep 17 00:00:00 2001 From: John Kary Date: Mon, 18 Feb 2013 23:26:07 -0600 Subject: [PATCH 3/4] Remove extra whitespace --- cookbook/bundles/extension.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index d7d062f5901..3a757ab31eb 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -21,7 +21,7 @@ as integration of other related components: framework: # ... - form: true + form: true .. code-block:: xml @@ -33,7 +33,7 @@ as integration of other related components: $container->loadFromExtension('framework', array( // ... - 'form' => true, + 'form' => true, // ... )); From fd9a696f51e7b808485e53ca6d2a87f4a25dd300 Mon Sep 17 00:00:00 2001 From: John Kary Date: Tue, 19 Feb 2013 00:48:21 -0600 Subject: [PATCH 4/4] Add API doc links --- cookbook/bundles/extension.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index 3a757ab31eb..105f048c798 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -496,7 +496,8 @@ As long as your bundle's configuration is located in the standard location (``YourBundle\DependencyInjection\Configuration``) and does not have a ``__construct()`` it will work automatically. If you have something different, your ``Extension`` class must override the -``Extension::getConfiguration()`` method and return an instance of your +:method:`Extension::getConfiguration() ` +method and return an instance of your ``Configuration``. Comments and examples can be added to your configuration nodes using the @@ -548,9 +549,9 @@ When creating an extension, follow these simple conventions: * The extension should provide an XSD schema. If you follow these simple conventions, your extensions will be registered -automatically by Symfony2. If not, override the Bundle -:method:`Symfony\\Component\\HttpKernel\\Bundle\\Bundle::build` method in -your bundle:: +automatically by Symfony2. If not, override the +:method:`Bundle::build() ` +method in your bundle:: // ... use Acme\HelloBundle\DependencyInjection\UnconventionalExtensionClass;