From 59c42993555039433801db77a0e4b36deb41954c Mon Sep 17 00:00:00 2001 From: Krzysztof Lechowski Date: Sun, 16 Oct 2016 19:48:52 +0200 Subject: [PATCH 1/3] note to make sure user's overriding bundle is registered --- bundles/inheritance.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bundles/inheritance.rst b/bundles/inheritance.rst index 90457f54320..bcb696f80f1 100644 --- a/bundles/inheritance.rst +++ b/bundles/inheritance.rst @@ -13,8 +13,13 @@ things like controllers, templates, and other files in a bundle's For example, suppose that you're installing the `FOSUserBundle`_, but you want to override its base ``layout.html.twig`` template, as well as one of its controllers. Suppose also that you have your own UserBundle where you want -the overridden files to live. Start by registering the FOSUserBundle as the -"parent" of your bundle:: +the overridden files to live. + +.. note:: + + If you've just created your own UserBundle to make the overrides, make sure you register it in app/AppKernel.php + +Let's start by registering the FOSUserBundle as the "parent" of your bundle:: // src/UserBundle/UserBundle.php namespace UserBundle; From 9351233ec8c1213d6641b46e482095c9ca29ea66 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 21 Nov 2016 11:13:33 +0100 Subject: [PATCH 2/3] Reword the introduction to the article --- bundles/inheritance.rst | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bundles/inheritance.rst b/bundles/inheritance.rst index bcb696f80f1..4bc598ddbae 100644 --- a/bundles/inheritance.rst +++ b/bundles/inheritance.rst @@ -10,16 +10,12 @@ in one of your own bundles. Symfony gives you a very convenient way to override things like controllers, templates, and other files in a bundle's ``Resources/`` directory. -For example, suppose that you're installing the `FOSUserBundle`_, but you -want to override its base ``layout.html.twig`` template, as well as one of -its controllers. Suppose also that you have your own UserBundle where you want -the overridden files to live. +For example, suppose that you have installed `FOSUserBundle`_ but you want to +override its base ``layout.html.twig`` template, as well as one of its +controllers. -.. note:: - - If you've just created your own UserBundle to make the overrides, make sure you register it in app/AppKernel.php - -Let's start by registering the FOSUserBundle as the "parent" of your bundle:: +First, create a new bundle called UserBundle and enable it in your application. +Then, register the third-party FOSUserBundle as the "parent" of your bundle:: // src/UserBundle/UserBundle.php namespace UserBundle; From c73bf946452a669736863ac40777e07070bc14de Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 23 Nov 2016 08:50:06 +0100 Subject: [PATCH 3/3] Added missing comma --- bundles/inheritance.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/inheritance.rst b/bundles/inheritance.rst index 4bc598ddbae..40985105cb0 100644 --- a/bundles/inheritance.rst +++ b/bundles/inheritance.rst @@ -10,7 +10,7 @@ in one of your own bundles. Symfony gives you a very convenient way to override things like controllers, templates, and other files in a bundle's ``Resources/`` directory. -For example, suppose that you have installed `FOSUserBundle`_ but you want to +For example, suppose that you have installed `FOSUserBundle`_, but you want to override its base ``layout.html.twig`` template, as well as one of its controllers.