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

Commit 600e682

Browse files
committed
Merge pull request #363 from symfony-cmf/extension_docs
Added reference for core admin extensions
2 parents 6f83578 + ef94caa commit 600e682

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

bundles/core/persistence.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ enforce a single translation strategy for all documents:
102102

103103
See the `PHPCR-ODM documentation`_ for more information.
104104

105+
.. _bundle-core-translatable-admin-extension:
106+
105107
Editing Locale Information: Translatable Sonata Admin Extension
106108
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
107109

@@ -129,7 +131,6 @@ configuration in the ``sonata_admin`` section of your project configuration:
129131
<!-- app/config/config.xml -->
130132
<?xml version="1.0" charset="UTF-8" ?>
131133
<container xmlns="http://symfony.com/schema/dic/services">
132-
133134
<config xmlns="http://sonata-project.org/schema/dic/admin">
134135
<!-- ... -->
135136
<extension id="cmf_core.admin_extension.translatable">

bundles/core/publish_workflow.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ This means that custom templates for ``templates_by_class`` and the controllers
358358
of ``controllers_by_class`` need not check for publication explicitly as its
359359
already done.
360360

361+
.. _bundle-core-workflow-admin-extensions:
362+
361363
Editing publication information: Publish Workflow Sonata Admin Extension
362364
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363365

reference/configuration/core.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,67 @@ only published routes and content can be accessed.
253253
'request_listener' => true,
254254
),
255255
));
256+
257+
Sonata Admin
258+
------------
259+
260+
This section configures the Sonata Admin Extensions, see:
261+
262+
* :ref:`Publish Workflow Admin Extensions <bundle-core-workflow-admin-extensions>`;
263+
* :ref:`Translatable Admin Extension <bundle-core-translatable-admin-extension>`.
264+
265+
.. configuration-block::
266+
267+
.. code-block:: yaml
268+
269+
cmf_core:
270+
sonata_admin:
271+
extensions:
272+
publishable:
273+
form_group: form.group_publish_workflow
274+
publish_time:
275+
form_group: form.group_general
276+
translatable:
277+
form_group: form.group_general
278+
279+
.. code-block:: xml
280+
281+
<?xml version="1.0" charset="UTF-8" ?>
282+
<container xmlns="http://symfony.com/schema/dic/services">
283+
284+
<config xmlns="http://cmf.symfony.com/schema/dic/core">
285+
<sonata-admin>
286+
<extension>
287+
<publishable form-group="form.group_publish_workflow" />
288+
<publish-time form-group="form.group_general" />
289+
<translatable form-group="form.group_general" />
290+
</extension>
291+
</sonata-admin>
292+
</config>
293+
</container>
294+
295+
.. code-block:: php
296+
297+
$container->loadFromExtension('cmf_core', array(
298+
'sonata_admin' => array(
299+
'extensions' => array(
300+
'publishable' => array(
301+
'form_group' => 'form.group_publish_workflow',
302+
),
303+
'publish_time' => array(
304+
'form_group' => 'form.group_general',
305+
),
306+
'translatable' => array(
307+
'form_group' => 'form.group_general',
308+
),
309+
),
310+
),
311+
));
312+
313+
form_group
314+
~~~~~~~~~~
315+
316+
**type**: ``string`` **default**: as in above example.
317+
318+
Defines which form group the fields from this extension will appear in within
319+
the Sonata Admin edit interface.

0 commit comments

Comments
 (0)