Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 61c5076

Browse files
dbuwouterj
authored andcommitted
documenting when more than the bundle itself needs to be registered in the kernel
1 parent 6a1e05b commit 61c5076

File tree

7 files changed

+129
-17
lines changed

7 files changed

+129
-17
lines changed

bundles/block/introduction.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,29 @@ Installation
1818
You can install this bundle `with composer`_ using the
1919
`symfony-cmf/block-bundle`_ package.
2020

21+
As the bundle is using the `SonataBlockBundle`_, you need to instantiate some
22+
sonata bundles in addition to the CmfBlockBundle::
23+
24+
// app/AppKernel.php
25+
26+
// ...
27+
class AppKernel extends Kernel
28+
{
29+
public function registerBundles()
30+
{
31+
$bundles = array(
32+
// ...
33+
new Sonata\BlockBundle\SonataBlockBundle(),
34+
new Sonata\CoreBundle\SonataCoreBundle(),
35+
new Symfony\Cmf\Bundle\BlockBundle\CmfBlockBundle(),
36+
);
37+
38+
// ...
39+
}
40+
41+
// ...
42+
}
43+
2144
.. _bundle-block-configuration:
2245

2346
Usage

bundles/media/introduction.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ persisted using Doctrine PHPCR-ODM, Doctrine ORM or something else.
4040
Installation
4141
------------
4242

43-
1. You can install the bundle via Composer (``symfony-cmf/media-bundle`` on
44-
`Packagist`_).
43+
You can install this bundle `with composer`_ using the
44+
`symfony-cmf/media-bundle`_ package.
4545

46-
2. When using the file and image controller for downloading, uploading and
47-
displaying, add the following lines to the end of your routing file:
46+
Configuration
47+
-------------
48+
When using the file and image controller for downloading, uploading and
49+
displaying, add the following lines to your routing file:
4850

4951
.. configuration-block::
5052

@@ -85,14 +87,14 @@ Installation
8587
8688
return $collection;
8789
88-
3. For now, the only supported persistence layer is PHPCR. If you enabled PHPCR
89-
on the CoreBundle, you need to do nothing here. If you do not have the
90-
CMF CoreBundle in your project, you need to configure
91-
``cmf_media.persistence.phpcr.enabled: true``.
90+
For now, the only supported persistence layer is PHPCR. If you enabled PHPCR
91+
on the CoreBundle, you need to do nothing here. If you do not have the
92+
CmfCoreBundle in your project, you need to configure
93+
``cmf_media.persistence.phpcr.enabled: true``.
9294

93-
4. For PHPCR, run the ``doctrine:phpcr:repository:init`` command, to have the
94-
base paths initialized, using the
95-
:ref:`repository initializers <phpcr-odm-repository-initializers>`.
95+
Then run the ``doctrine:phpcr:repository:init`` command, to have the base paths
96+
initialized, using the
97+
:ref:`repository initializers <phpcr-odm-repository-initializers>`.
9698

9799
Interfaces
98100
----------
@@ -263,8 +265,9 @@ and Symfony bundles:
263265
* :doc:`adapters/elfinder`
264266
* :doc:`adapters/gaufrette`
265267

268+
.. _`symfony-cmf/media-bundle`: https://packagist.org/packages/symfony-cmf/media-bundle
269+
.. _`with composer`: http://getcomposer.org
266270
.. _`MediaBundle`: https://github.com/symfony-cmf/MediaBundle#readme
267-
.. _`Packagist`: https://packagist.org/packages/symfony-cmf/media-bundle
268271
.. _`KnpLabs/Gaufrette`: https://github.com/KnpLabs/Gaufrette
269272
.. _`phpcr/phpcr-utils`: https://github.com/phpcr/phpcr-utils
270273
.. _`jms/serializer-bundle`: https://github.com/schmittjoh/JMSSerializerBundle

bundles/menu/introduction.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@ Installation
2727
You can install this bundle `with composer`_ using the
2828
`symfony-cmf/menu-bundle`_ package.
2929

30+
As the bundle is using the `KnpMenuBundle`_, you need to instantiate that
31+
bundles in addition to the CmfMenuBundle::
32+
33+
// app/AppKernel.php
34+
35+
// ...
36+
class AppKernel extends Kernel
37+
{
38+
public function registerBundles()
39+
{
40+
$bundles = array(
41+
// ...
42+
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
43+
new Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle(),
44+
);
45+
46+
// ...
47+
}
48+
49+
// ...
50+
}
51+
3052
Creating a Simple Persistent Menu
3153
---------------------------------
3254

bundles/phpcr_odm/introduction.rst

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,27 @@ If you want to use PHPCR-ODM, you additionally need to require
5252
...
5353
}
5454
55-
Besides ``Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle`` you also need to
56-
instantiate the ``Doctrine\Bundle\DoctrineBundle\DoctrineBundle`` in your app
57-
kernel.
55+
Besides the ``DoctrinePHPCRBundle`` you also need to instantiate the base
56+
``DoctrineBundle`` in your kernel::
57+
58+
// app/AppKernel.php
59+
60+
// ...
61+
class AppKernel extends Kernel
62+
{
63+
public function registerBundles()
64+
{
65+
$bundles = array(
66+
// ...
67+
new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(),
68+
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
69+
);
70+
71+
// ...
72+
}
73+
74+
// ...
75+
}
5876

5977
Configuration
6078
-------------

bundles/routing_auto/introduction.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,28 @@ Installation
2020
You can install this bundle `with composer`_ using the
2121
`symfony-cmf/routing-auto-bundle`_ package.
2222

23+
This bundle is based on the :doc:`../routing/index`, and you need to
24+
instantiate both bundles::
25+
26+
// app/AppKernel.php
27+
28+
// ...
29+
class AppKernel extends Kernel
30+
{
31+
public function registerBundles()
32+
{
33+
$bundles = array(
34+
// ...
35+
new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
36+
new Symfony\Cmf\Bundle\RoutingAutoBundle\CmfRoutingAutoBundle(),
37+
);
38+
39+
// ...
40+
}
41+
42+
// ...
43+
}
44+
2345
Features
2446
--------
2547

bundles/seo/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Installation
1010
You can install this bundle `with composer`_ using the
1111
``symfony-cmf/seo-content-bundle`` package on `Packagist`_.
1212

13-
Both the CmfSeoBundle and SonataSeoBundle must be registered in the
14-
``AppKernel``::
13+
This bundle extends the SonataSeoBundle which must be registered in the
14+
kernel as well::
1515

1616
// app/appKernel.php
1717

bundles/simple_cms/introduction.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ Installation
3030
You can install this bundle `with composer`_ using the
3131
``symfony-cmf/simple-cms-bundle`` package on `Packagist`_.
3232

33+
This bundle integrates the routing, content and menu bundles of the CMF. All of
34+
them and their dependencies need to be instantiated in the kernel::
35+
36+
// app/AppKernel.php
37+
38+
// ...
39+
class AppKernel extends Kernel
40+
{
41+
public function registerBundles()
42+
{
43+
$bundles = array(
44+
// ...
45+
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
46+
new Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle(),
47+
new Symfony\Cmf\Bundle\ContentBundle\CmfContentBundle(),
48+
new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
49+
);
50+
51+
// ...
52+
}
53+
54+
// ...
55+
}
56+
3357
Sections
3458
--------
3559

0 commit comments

Comments
 (0)