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

Commit 4f54a08

Browse files
authored
Merge pull request #834 from symfony-cmf/2.0
2.0
2 parents cd7bc95 + 4d1a74d commit 4f54a08

File tree

103 files changed

+2925
-2707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2925
-2707
lines changed
Loading
Loading
-7.37 KB
Binary file not shown.
-44.1 KB
Binary file not shown.
-29.5 KB
Binary file not shown.
-30.4 KB
Binary file not shown.
44.2 KB
Loading

big-picture-home.png

83.3 KB
Loading

book/database_layer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ After this, you have to create getters and setters for the properties.
185185

186186
You may want to implement ``Doctrine\ODM\PHPCR\HierarchyInterface``
187187
which makes it for example possible to leverage the
188-
:ref:`Sonata Admin Child Extension <bundle-core-child-admin-extension>`.
188+
:doc:`Sonata Admin Child Extension <../bundles/sonata_phpcr_admin_integration/core>`.
189189

190190
.. seealso::
191191

book/handling_multilang.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,8 @@ default locale, for example ``/de/admin/dashboard``. When clicking on the
320320
language switcher, the page reloads and displays the correct content for the
321321
requested language.
322322

323-
If your documents implement the TranslatableInterface, you can
324-
:ref:`configure the translatable admin extension <bundle-core-translatable-admin-extension>`
325-
to get a language choice field to let the administrator
326-
choose in which language to store the content.
323+
If your documents implement the TranslatableInterface, use the
324+
SonataTranslationBundle_ to enable multi-language editing in the admin backend.
327325

328326
Frontend Editing and multi-language
329327
-----------------------------------
@@ -348,3 +346,4 @@ save the edited document in the same language as it was loaded.
348346
.. _`cmf-sandbox config.yml file`: https://github.com/symfony-cmf/cmf-sandbox/blob/master/app/config/config.yml
349347
.. _`PHPCR-ODM documentation on multi-language`: http://docs.doctrine-project.org/projects/doctrine-phpcr-odm/en/latest/reference/multilang.html
350348
.. _`issue`: https://github.com/symfony-cmf/create-bundle/issues/39
349+
.. _SonataTranslationBundle: https://packagist.org/packages/sonata-project/translation-bundle

book/routing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ handle ``StaticContent`` as :ref:`explained above <start-routing-getting-control
519519

520520
The PHPCR-ODM routes support more things, for example route parameters,
521521
requirements and defaults. This is explained in the
522-
:ref:`route document section in the RoutingBundle documentation <bundle-routing-document>`.
523-
You can also find :ref:`route entity documentation and Doctrine ORM integration <bundle-routing-entity>`.
522+
:ref:`route document section in the RoutingBundle documentation <bundles-routing-document>`.
523+
You can also find :ref:`route entity documentation and Doctrine ORM integration <bundles-routing-entity>`.
524524

525525
Further Notes
526526
-------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
``enabled``
2+
***********
3+
4+
**type**: ``bool`` **default**: ``false``
5+
6+
If ``true``, the admin classes and extensions of this package are loaded and
7+
available for Sonata Admin.
8+
9+
.. tip::
10+
11+
If you do not see this admin on the Sonata dashboard, you need to configure
12+
the dashboard to show the admin service in question. Read more about this
13+
in `the Sonata Admin documentation`_.
14+
15+
.. _the Sonata Admin documentation: https://sonata-project.org/bundles/admin/3-x/doc/reference/dashboard.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The name of the form group to use in the admin extension.
2+
3+
The caption for the group is determined by translating the group name. If you
4+
change the group, be sure to also define a translation for it.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The name of the form tab to use in the admin extension.
2+
3+
The caption for the tab is determined by translating the tab name. If you
4+
change the tab name, be sure to also define a translation for it.
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. note::
2+
3+
To focus our efforts onto a manageable number of packages, this package is
4+
currently *not* maintained. Security fixes and submitted bug fixes will
5+
still be released, but no new features should be expected. This bundle
6+
might have outdated documentation, there is no support from the CMF team
7+
and you should not expect bugs to be fixed.
8+
9+
If you want to help co-maintaining this package, tell us in a GitHub issue
10+
or in #symfony_cmf of the `Symfony devs slack`_.
11+
12+
.. _`Symfony devs slack`: https://slackinvite.me/to/symfony-devs

bundles/block/cache.rst

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Cache
22
=====
33

4-
The Symfony2 CMF BlockBundle integrates with the `SonataCacheBundle`_ to
4+
The CmfBlockBundle integrates with the `SonataCacheBundle`_ to
55
provide several caching solutions. Have a look at the available adapters in the
66
`SonataCacheBundle`_ to see all options.
77

8-
The Symfony2 CMF BlockBundle additionally provides its own adapters for:
8+
The CmfBlockBundle additionally provides its own adapters for:
99

1010
* `ESI`_ (service: ``cmf.block.cache.varnish``)
1111
* `SSI`_ (service: ``cmf.block.cache.ssi``)
@@ -15,7 +15,7 @@ The Symfony2 CMF BlockBundle additionally provides its own adapters for:
1515
.. note::
1616

1717
It is advised to store all settings in the block document when using cache.
18-
See also :ref:`bundle-block-cache-rendering`.
18+
See also :ref:`bundles-block-cache-rendering`.
1919

2020
Dependencies
2121
------------
@@ -119,7 +119,7 @@ CmfBlockBundle and the SonataBlockBundle:
119119
),
120120
),
121121
'blocks_by_class' => array(
122-
'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\RssBlock' => array(
122+
Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\RssBlock::class => array(
123123
'cache' => 'symfony_cmf.block.cache.js_async',
124124
),
125125
),
@@ -133,8 +133,7 @@ When a block having a cache configured is rendered, the following process
133133
is triggered:
134134

135135
* The document is loaded based on the name;
136-
* If caching is configured, the cache is checked and content is returned if
137-
found.
136+
* The cache is checked and content is returned if found.
138137

139138
* Cache keys are computed using:
140139

@@ -165,7 +164,7 @@ If the cache is checked and the cache adapter returned that no cache was found,
165164
the workflow proceeds like this:
166165

167166
* The block service is asked to render the block
168-
:ref:`as usual <bundle-block-execute>`;
167+
:ref:`as usual <bundles-block-execute>`;
169168
* If the ``Response`` is cacheable, the configured adapter creates a cache
170169
element containing:
171170

@@ -179,7 +178,7 @@ the workflow proceeds like this:
179178
Cache Keys
180179
----------
181180

182-
It is the responsibility of the :ref:`block service <bundle-block-service>` to generate the cache keys in
181+
It is the responsibility of the :ref:`block service <bundles-block-service>` to generate the cache keys in
183182
the method ``getCacheKeys``.
184183

185184
The block services shipped with the Symfony CMF BlockBunde use the
@@ -220,7 +219,7 @@ The BlockBundle also has a cache invalidation listener that calls the
220219
``flush`` method of a cache adapter automatically when a cached block document
221220
is updated or removed.
222221

223-
.. _bundle-block-cache-rendering:
222+
.. _bundles-block-cache-rendering:
224223

225224
Block Rendering
226225
---------------

bundles/block/configuration.rst

+3-173
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ application configuration. When using XML, you can use the
77

88
The BlockBundle *automatically* changes some defaults and adds configuration
99
to the SonataBlockBundle to make the integration work seamlessly. See the
10-
:ref:`updated SonataBlockBundle defaults <bundle-block-updated-sonata-defaults>`
10+
:ref:`updated SonataBlockBundle defaults <bundles-block-updated-sonata-defaults>`
1111
for more information.
1212

1313
Configuration
@@ -34,21 +34,6 @@ is the following configuration:
3434
enabled: false
3535
block_basepath: /cms/content
3636
manager_name: ~
37-
string_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\StringBlock
38-
simple_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock
39-
container_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ContainerBlock
40-
reference_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock
41-
action_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ActionBlock
42-
slideshow_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SlideshowBlock
43-
imagine_document_class: Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock
44-
use_sonata_admin: auto
45-
string_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\StringBlockAdmin
46-
simple_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\SimpleBlockAdmin
47-
container_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\ContainerBlockAdmin
48-
reference_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\ReferenceBlockAdmin
49-
action_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\ActionBlockAdmin
50-
slideshow_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\SlideshowBlockAdmin
51-
imagine_admin_class: Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\ImagineBlockAdmin
5237
5338
.. code-block:: xml
5439
@@ -59,23 +44,8 @@ is the following configuration:
5944
<persistence>
6045
<phpcr
6146
enabled="false"
62-
manager-name="null"
6347
block-basepath="/cms/content"
64-
string-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\StringBlock"
65-
simple-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock"
66-
container-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ContainerBlock"
67-
reference-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock"
68-
action-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ActionBlock"
69-
slideshow-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SlideshowBlock"
70-
imagine-document-class="Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock"
71-
use-sonata-admin="auto"
72-
string-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\StringBlockAdmin"
73-
simple-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\SimpleBlockAdmin"
74-
container-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\ContainerBlockAdmin"
75-
reference-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\ReferenceBlockAdmin"
76-
action-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\ActionBlockAdmin"
77-
slideshow-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\SlideshowBlockAdmin"
78-
imagine-admin-class="Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\ImagineBlockAdmin"
48+
manager-name="null"
7949
/>
8050
</persistence>
8151
</config>
@@ -90,21 +60,6 @@ is the following configuration:
9060
'enabled' => false,
9161
'block-basepath' => '/cms/content',
9262
'manager_name' => null,
93-
'string_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\StringBlock',
94-
'simple_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock',
95-
'container_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ContainerBlock',
96-
'reference_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock',
97-
'action_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ActionBlock',
98-
'slideshow_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SlideshowBlock',
99-
'imagine_document_class' => 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock',
100-
'use_sonata_admin' => 'auto',
101-
'string_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\StringBlockAdmin',
102-
'simple_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\SimpleBlockAdmin',
103-
'container_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\ContainerBlockAdmin',
104-
'reference_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\ReferenceBlockAdmin',
105-
'action_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\ActionBlockAdmin',
106-
'slideshow_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\SlideshowBlockAdmin',
107-
'imagine_admin_class' => 'Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\ImagineBlockAdmin',
10863
),
10964
),
11065
));
@@ -130,123 +85,6 @@ the value of ``%cmf_core.persistence.phpcr.basepath%/content``.
13085

13186
.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc
13287

133-
``string_document_class``
134-
"""""""""""""""""""""""""
135-
136-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\StringBlock``
137-
138-
The string block document class.
139-
140-
``simple_document_class``
141-
"""""""""""""""""""""""""
142-
143-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock``
144-
145-
The simple block document class.
146-
147-
``container_document_class``
148-
""""""""""""""""""""""""""""
149-
150-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ContainerBlock``
151-
152-
The container block document class.
153-
154-
``reference_document_class``
155-
""""""""""""""""""""""""""""
156-
157-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock``
158-
159-
The reference block document class.
160-
161-
``action_document_class``
162-
"""""""""""""""""""""""""
163-
164-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ActionBlock``
165-
166-
The action block document class.
167-
168-
If phpcr is enabled ``use_sonata_admin`` is enabled, the class value is set in
169-
``Resources/config/admin.xml``.
170-
171-
``slideshow_document_class``
172-
""""""""""""""""""""""""""""
173-
174-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SlideshowBlock``
175-
176-
The slideshow block document class.
177-
178-
``imagine_document_class``
179-
""""""""""""""""""""""""""
180-
181-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock``
182-
183-
The imagine block document class. This document will only work properly if
184-
you set up the LiipImagineBundle.
185-
186-
``use_sonata_admin``
187-
""""""""""""""""""""
188-
189-
**type**: ``enum`` **valid values**: ``true|false|auto`` **default**: ``auto``
190-
191-
If ``true``, the admin classes are activated. If set to ``auto``, they are
192-
activated only if the SonataPhpcrAdminBundle is present.
193-
194-
If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value
195-
of ``cmf_core.persistence.phpcr.use_sonata_admin``.
196-
197-
``string_admin_class``
198-
""""""""""""""""""""""
199-
200-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\StringBlockAdmin``
201-
202-
The sonata admin class of the string block.
203-
204-
``simple_admin_class``
205-
""""""""""""""""""""""
206-
207-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\SimpleBlockAdmin``
208-
209-
The sonata admin class of the simple block.
210-
211-
``container_admin_class``
212-
"""""""""""""""""""""""""
213-
214-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\ContainerBlockAdmin``
215-
216-
The sonata admin class of the container block.
217-
218-
``reference_admin_class``
219-
"""""""""""""""""""""""""
220-
221-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\ReferenceBlockAdmin``
222-
223-
The sonata admin class of the reference block.
224-
225-
``action_admin_class``
226-
""""""""""""""""""""""
227-
228-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\ActionBlockAdmin``
229-
230-
The sonata admin class of the action block.
231-
232-
``slideshow_admin_class``
233-
"""""""""""""""""""""""""
234-
235-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\SlideshowBlockAdmin``
236-
237-
The sonata admin class of the slideshow block.
238-
239-
This admin will only be loaded if ``use_imagine`` is enabled.
240-
241-
``imagine_admin_class``
242-
"""""""""""""""""""""""
243-
244-
**type**: ``string`` **default**: ``Symfony\Cmf\Bundle\BlockBundle\Admin\Imagine\ImagineBlockAdmin``
245-
246-
The sonata admin class of the imagine block.
247-
248-
This admin will only be loaded if ``use_imagine`` is enabled.
249-
25088
``twig``
25189
~~~~~~~~
25290

@@ -258,7 +96,7 @@ This admin will only be loaded if ``use_imagine`` is enabled.
25896
The BlockBundle provides a Twig filter ``cmf_embed_blocks`` that
25997
looks through the content and looks for special tags to render blocks.
26098

261-
See :ref:`embed blocks in content <bundle-block-embed>` for using the
99+
See :ref:`embed blocks in content <bundles-block-embed>` for using the
262100
``cmf_embed_blocks`` filter.
263101

264102
``prefix``
@@ -275,14 +113,6 @@ The part before the actual path to the block.
275113

276114
The part after the actual path to the block.
277115

278-
``use_imagine``
279-
~~~~~~~~~~~~~~~
280-
281-
**type**: ``enum`` **valid values**: ``true|false|auto`` **default**: ``auto``
282-
283-
If ``true``, the imagine related block classes and admin classes are activated.
284-
If set to ``auto``, they are activated only if the LiipImagineBundle is present.
285-
286116
``caches``
287117
~~~~~~~~~~
288118

0 commit comments

Comments
 (0)