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

Commit 8b90794

Browse files
committed
Merge pull request #490 from symfony-cmf/core_bundle
Core bundle
2 parents 7eaaaef + 4dc8af2 commit 8b90794

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

bundles/core/persistence.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ configuration in the ``sonata_admin`` section of your project configuration:
132132
cmf_core.admin_extension.child:
133133
implements:
134134
- Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface
135+
- Doctrine\ODM\PHPCR\HierarchyInterface
135136
136137
.. code-block:: xml
137138
@@ -142,6 +143,7 @@ configuration in the ``sonata_admin`` section of your project configuration:
142143
<!-- ... -->
143144
<extension id="cmf_core.admin_extension.child">
144145
<implement>Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface</implement>
146+
<implement>Doctrine\ODM\PHPCR\HierarchyInterface</implement>
145147
</extension>
146148
</config>
147149
@@ -156,6 +158,7 @@ configuration in the ``sonata_admin`` section of your project configuration:
156158
'cmf_core.admin_extension.child' => array(
157159
'implements' => array(
158160
'Symfony\Cmf\Bundle\CoreBundle\Model\ChildInterface',
161+
'Doctrine\ODM\PHPCR\HierarchyInterface',
159162
),
160163
),
161164
),

reference/configuration/core.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,52 @@ is the following configuration:
6868
),
6969
));
7070
71+
orm
72+
...
73+
74+
This defines the persistence driver. The default configuration of persistence
75+
is the following configuration:
76+
77+
.. configuration-block::
78+
79+
.. code-block:: yaml
80+
81+
cmf_core:
82+
persistence:
83+
orm:
84+
enabled: false
85+
manager_name: ~
86+
use_sonata_admin: auto
87+
88+
.. code-block:: xml
89+
90+
<?xml version="1.0" charset="UTF-8" ?>
91+
<container xmlns="http://symfony.com/schema/dic/services">
92+
93+
<config xmlns="http://cmf.symfony.com/schema/dic/core">
94+
<persistence>
95+
<phpcr
96+
enabled="false"
97+
manager-name="null"
98+
use-sonata-admin="auto"
99+
/>
100+
</persistence>
101+
</config>
102+
103+
</container>
104+
105+
.. code-block:: php
106+
107+
$container->loadFromExtension('cmf_core', array(
108+
'persistence' => array(
109+
'phpcr' => array(
110+
'enabled' => false,
111+
'manager_name' => null,
112+
'use_sonata_admin' => 'auto',
113+
),
114+
),
115+
));
116+
71117
enabled
72118
"""""""
73119

0 commit comments

Comments
 (0)