File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -78,18 +78,22 @@ The following is the recommended directory structure of an AcmeBlogBundle:
78
78
├── LICENSE
79
79
└── README.md
80
80
81
- This directory structure requires to configure the bundle path to its root
82
- directory as follows::
81
+ .. note ::
82
+
83
+ This directory structure is used by default when your bundle class extends
84
+ the recommended :class: `Symfony\\ Component\\ HttpKernel\\ Bundle\\ AbstractBundle `.
85
+ If your bundle extends the :class: `Symfony\\ Component\\ HttpKernel\\ Bundle\\ Bundle `
86
+ class, you have to override the ``getPath() `` method as follows::
83
87
84
- use Symfony\Component\HttpKernel\Bundle\AbstractBundle ;
88
+ use Symfony\Component\HttpKernel\Bundle\Bundle ;
85
89
86
- class AcmeBlogBundle extends AbstractBundle
87
- {
88
- public function getPath(): string
90
+ class AcmeBlogBundle extends Bundle
89
91
{
90
- return \dirname(__DIR__);
92
+ public function getPath(): string
93
+ {
94
+ return \dirname(__DIR__);
95
+ }
91
96
}
92
- }
93
97
94
98
**The following files are mandatory **, because they ensure a structure convention
95
99
that automated tools can rely on:
You can’t perform that action at this time.
0 commit comments