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

Commit 4784fea

Browse files
committed
remove sonata setup instructions, split admin integration doc
1 parent cb5264f commit 4784fea

File tree

9 files changed

+83
-177
lines changed

9 files changed

+83
-177
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
ContentBundle
2+
=============
3+
4+
This integration becomes available once the :doc:`CmfContentBundle
5+
<../content/introduction>` is installed.
6+
7+
Content bundle support consists in an admin interface for the ``StaticContent``
8+
document. Enable this admin using:
9+
10+
.. configuration-block::
11+
12+
.. code-block:: yaml
13+
14+
# app/config/config.yml
15+
cmf_sonata_phpcr_admin_integration:
16+
bundles:
17+
content: ~
18+
19+
.. code-block:: xml
20+
21+
<!-- app/config/config.xml -->
22+
<?xml version="2.0" encoding="UTF-8" ?>
23+
<container xmlns="http://symfony.com/schema/dic/services"
24+
xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
25+
xsd:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
26+
http://cmf.symfony.com/schema/dic/sonata_admin_integration http://cmf.symfony.com/schema/dic/sonata_admin_integration/sonata_admin_integration.xsd"
27+
>
28+
29+
<config xmlns="http://cmf.symfony.com/schema/dic/sonata_admin_integration">
30+
<bundles>
31+
<content/>
32+
</bundles>
33+
</config>
34+
</container>
35+
36+
.. code-block:: php
37+
38+
// app/config/config.php
39+
$container->loadFromExtension('cmf_sonata_phpcr_admin_integration', [
40+
'bundles' => [
41+
'content' => true,
42+
],
43+
]);
44+
45+
.. tip::
46+
47+
Install the IvoryCKEditorBundle_ to enable a CKEditor to edit the content
48+
body:
49+
50+
.. code-block:: bash
51+
52+
$ composer require egeloen/ckeditor-bundle
53+
54+
.. _IvoryCKEditorBundle: https://github.com/egeloen/IvoryCKEditorBundle
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CoreBundle
2+
==========

bundles/sonata_phpcr_admin_integration/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ SonataPhpcrAdminIntegrationBundle
55
:maxdepth: 2
66

77
introduction
8+
core
9+
content
10+
menu
11+
routing
12+
routing_auto
13+
seo

bundles/sonata_phpcr_admin_integration/introduction.rst

Lines changed: 10 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -48,112 +48,6 @@ SonataDoctrinePhpcrAdminBundle related bundles::
4848
return $bundles;
4949
}
5050

51-
Sonata requires the ``sonata_block`` bundle to be configured in your main
52-
configuration:
53-
54-
.. configuration-block::
55-
56-
.. code-block:: yaml
57-
58-
# app/config/config.yml
59-
60-
# ...
61-
sonata_block:
62-
default_contexts: [cms]
63-
blocks:
64-
# Enable the SonataAdminBundle block
65-
sonata.admin.block.admin_list:
66-
contexts: [admin]
67-
68-
.. code-block:: xml
69-
70-
<!-- app/config/config.xml -->
71-
<?xml version="1.0" encoding="UTF-8" ?>
72-
<container xmlns="htp://symfony.com/schema/dic/services">
73-
<config xmlns="http://sonata-project.org/schema/dic/block">
74-
<default-context>cms</default-context>
75-
76-
<block id="sonata.admin.block.admin_list">
77-
<context>admin</context>
78-
</block>
79-
</config>
80-
</container>
81-
82-
.. code-block:: php
83-
84-
// app/config/config.php
85-
$container->loadFromExtension('sonata_block', array(
86-
'default_contexts' => array('cms'),
87-
'blocks' => array(
88-
'sonata.admin.block.admin_list' => array(
89-
'contexts' => array('admin'),
90-
),
91-
),
92-
));
93-
94-
and it requires the following entries in your routing file:
95-
96-
.. configuration-block::
97-
98-
.. code-block:: yaml
99-
100-
# app/config/routing.yml
101-
102-
admin:
103-
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
104-
prefix: /admin
105-
106-
_sonata_admin:
107-
resource: .
108-
type: sonata_admin
109-
prefix: /admin
110-
111-
.. code-block:: xml
112-
113-
<!-- app/config/routing.xml -->
114-
<?xml version="1.0" encoding="UTF-8" ?>
115-
<routes xmlns="http://symfony.com/schema/routing"
116-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
117-
xsi:schemaLocation="http://symfony.com/schema/routing
118-
http://symfony.com/schema/routing/routing-1.0.xsd">
119-
120-
<import
121-
resource="@SonataAdminBundle/Resources/config/sonata_admin.xml"
122-
prefix="/admin"
123-
/>
124-
125-
<import
126-
resource="."
127-
type="sonata_admin"
128-
prefix="/admin"
129-
/>
130-
131-
</routes>
132-
133-
.. code-block:: php
134-
135-
// app/config/routing.php
136-
use Symfony\Component\Routing\RouteCollection;
137-
138-
$collection = new RouteCollection();
139-
$routing = $loader->import(
140-
"@SonataAdminBundle/Resources/config/sonata_admin.xml"
141-
);
142-
$routing->setPrefix('/admin');
143-
$collection->addCollection($routing);
144-
145-
$_sonataAdmin = $loader->import('.', 'sonata_admin');
146-
$_sonataAdmin->addPrefix('/admin');
147-
$collection->addCollection($_sonataAdmin);
148-
149-
return $collection;
150-
151-
and publish your assets (remove ``--symlink`` if you use Windows!):
152-
153-
.. code-block:: bash
154-
155-
$ php bin/console assets:install --symlink web/
156-
15751
Usage
15852
-----
15953

@@ -201,77 +95,18 @@ config:
20195
Configuration
20296
-------------
20397

204-
This section documents all available admin integrations in this bundle, with
205-
their configuration options.
206-
207-
Block
208-
~~~~~
209-
210-
Content
211-
~~~~~~~
212-
213-
This integration becomes available once the :doc:`CmfContentBundle
214-
<../content/introduction>` is installed. This will provide an admin interface
215-
for the ``StaticContent`` document. Enable this admin using:
216-
217-
.. configuration-block::
218-
219-
.. code-block:: yaml
220-
221-
# app/config/config.yml
222-
cmf_sonata_phpcr_admin_integration:
223-
bundles:
224-
content: ~
225-
226-
.. code-block:: xml
227-
228-
<!-- app/config/config.xml -->
229-
<?xml version="2.0" encoding="UTF-8" ?>
230-
<container xmlns="http://symfony.com/schema/dic/services"
231-
xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
232-
xsd:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
233-
http://cmf.symfony.com/schema/dic/sonata_admin_integration http://cmf.symfony.com/schema/dic/sonata_admin_integration/sonata_admin_integration.xsd"
234-
>
235-
236-
<config xmlns="http://cmf.symfony.com/schema/dic/sonata_admin_integration">
237-
<bundles>
238-
<content/>
239-
</bundles>
240-
</config>
241-
</container>
242-
243-
.. code-block:: php
244-
245-
// app/config/config.php
246-
$container->loadFromExtension('cmf_sonata_phpcr_admin_integration', [
247-
'bundles' => [
248-
'content' => true,
249-
],
250-
]);
251-
252-
.. tip::
253-
254-
Install the IvoryCKEditorBundle_ to enable a CKEditor to edit the content
255-
body:
256-
257-
.. code-block:: bash
258-
259-
$ composer require egeloen/ckeditor-bundle
260-
261-
Core
262-
~~~~
263-
264-
Menu
265-
~~~~
266-
267-
Routing
268-
~~~~~~~
98+
The configuration is split into a section for each supported CMF bundle.
99+
Each part is only available if the corresponding bundle is installed and
100+
registered with the kernel.
269101

270-
RoutingAuto
271-
~~~~~~~~~~~
102+
.. toctree::
272103

273-
Seo
274-
~~~
104+
core
105+
content
106+
menu
107+
routing
108+
routing_auto
109+
seo
275110

276111
Learn More
277112
----------
@@ -285,4 +120,3 @@ Learn More
285120
.. _SonataDoctrinePhpcrAdminBundle: https://sonata-project.org/bundles/doctrine-phpcr-admin/1-x/doc/index.html
286121
.. _its official installation guide: https://sonata-project.org/bundles/doctrine-phpcr-admin/1-x/doc/reference/installation.html
287122
.. _SonataAdminBundle: https://sonata-project.org/bundles/admin/3-x/doc/index.html
288-
.. _IvoryCKEditorBundle: https://github.com/egeloen/IvoryCKEditorBundle
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
MenuBundle
2+
==========
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
RoutingBundle
2+
=============
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
RoutingAutoBundle
2+
=================
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SeoBundle
2+
=========

tutorial/sonata-admin.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ The Backend - Sonata Admin
44
In this chapter you will build an administration interface with the help
55
of the SonataDoctrinePHPCRAdminBundle_.
66

7-
For the setup, follow the instructions in :doc:`../bundles/sonata_phpcr_admin_integration/introduction`.
7+
First, follow the `Sonata installation guide`_, and then the
8+
:doc:`instructions to set up the SonataPhpcrAdminIntegrationBundle <../bundles/sonata_phpcr_admin_integration/introduction>`.
89

910
Configuration
1011
-------------
@@ -545,3 +546,4 @@ to tell sonata about them:
545546
users to not make mistakes.
546547

547548
.. _SonataDoctrinePHPCRAdminBundle: https://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html
549+
.. _Sonata installation guide: https://sonata-project.org/bundles/doctrine-phpcr-admin/1-x/doc/reference/installation.html

0 commit comments

Comments
 (0)