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

Commit cd018e6

Browse files
committed
Merge branch 'master' into dev
Conflicts: bundles/simple_cms/introduction.rst bundles/tree_browser/introduction.rst
2 parents 8a6c883 + ac63714 commit cd018e6

File tree

3 files changed

+33
-89
lines changed

3 files changed

+33
-89
lines changed

bundles/simple_cms/introduction.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Installation
2828
------------
2929

3030
You can install this bundle `with composer`_ using the
31-
`symfony-cmf/simple-cms-bundle`_ package.
31+
``symfony-cmf/simple-cms-bundle`` package on `Packagist`_.
3232

3333
Sections
3434
--------
@@ -39,6 +39,5 @@ Sections
3939

4040
.. _`Symfony CMF Standard Edition`: https://github.com/symfony-cmf/symfony-cmf-standard
4141
.. _`CMF website`: https://github.com/symfony-cmf/cmf-website/
42-
.. _`symfony-cmf/simple-cms-bundle`: https://packagist.org/packages/symfony-cmf/simple-cms-bundle
4342
.. _`with composer`: http://getcomposer.org
44-
43+
.. _`Packagist`: https://packagist.org/packages/symfony-cmf/simple-cms-bundle

bundles/tree_browser/introduction.rst

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,25 @@ Installation
1818
------------
1919

2020
You can install this bundle `with composer`_ using the
21-
`symfony-cmf/tree-browser-bundle`_ package.
21+
``symfony-cmf/seo-content-bundle`` package on `Packagist`_.
22+
23+
Both the CmfTreeBrowserBundle and FOSJsRoutingBundle_ must be registered in the
24+
``AppKernel``::
25+
26+
// app/appKernel.php
27+
// ...
28+
public function registerBundles()
29+
{
30+
$bundles = array(
31+
// ...
32+
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
33+
new Symfony\Cmf\Bundle\TreeBrowserBundle\CmfTreeBrowserBundle(),
34+
);
35+
// ...
36+
37+
return $bundles;
38+
}
39+
>>>>>>> master
2240

2341
Routing
2442
-------
@@ -213,44 +231,10 @@ For example, if your want to open a custom action:
213231
214232
.. note::
215233

216-
Don't forget to add your custom route to the
217-
``fos_js_routing.routes_to_expose`` configuration:
234+
This bundle automatically exposes routes with the FOSJsRoutingBundle_
235+
to allow the tree to work.
218236

219-
.. configuration-block::
220-
221-
.. code-block:: yaml
222-
223-
fos_js_routing:
224-
routes_to_expose:
225-
- cmf_tree_browser.phpcr_children
226-
- cmf_tree_browser.phpcr_move
227-
- sonata.admin.doctrine_phpcr.phpcrodm_children
228-
- sonata.admin.doctrine_phpcr.phpcrodm_move
229-
- presta_cms_page_edit
230-
231-
.. code-block:: xml
232-
233-
<config xmlns="http://example.org/schema/dic/fos_js_routing">
234-
<routes-to-expose>cmf_tree_browser.phpcr_children</routes-to-expose>
235-
<routes-to-expose>cmf_tree_browser.phpcr_move</routes-to-expose>
236-
<routes-to-expose>sonata.admin.doctrine_phpcr.phpcrodm_children</routes-to-expose>
237-
<routes-to-expose>sonata.admin.doctrine_phpcr.phpcrodm_move</routes-to-expose>
238-
<routes-to-expose>presta_cms_page_edit</routes-to-expose>
239-
</config>
240-
241-
.. code-block:: php
242-
243-
$container->loadFromExtension('fos_js_routing', array(
244-
'routes_to_expose' => array(
245-
'cmf_tree_browser.phpcr_children',
246-
'cmf_tree_browser.phpcr_move',
247-
'sonata.admin.doctrine_phpcr.phpcrodm_children',
248-
'sonata.admin.doctrine_phpcr.phpcrodm_move',
249-
'presta_cms_page_edit',
250-
),
251-
));
252-
253-
.. _`symfony-cmf/tree-browser-bundle`: https://packagist.org/packages/symfony-cmf/tree-browser-bundle
237+
.. _`Packagist`: https://packagist.org/packages/symfony-cmf/tree-browser-bundle
254238
.. _`with composer`: http://getcomposer.org
255239
.. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle
256240
.. _`admin_tree.js`: https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Resources/views/Tree/tree.html.twig

reference/configuration/tree_browser.rst

Lines changed: 9 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ repository and can be configured under the ``cmf_tree_browser`` key in your
66
application configuration. When using XML, you can use the
77
``http://cmf.symfony.com/schema/dic/treebrowser`` namespace.
88

9+
.. note::
10+
11+
To use this bundle with the tree provided by SonataDoctrinePHPCRAdminBundle_,
12+
you do not need to provide any configuration here.
13+
914
Configuration
1015
-------------
1116

@@ -61,57 +66,13 @@ is the following configuration:
6166
enabled
6267
"""""""
6368

64-
**type**: ``boolean`` **default**: ``false``
65-
66-
If ``true``, PHPCR is enabled in the service container.
67-
68-
If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to
69-
the value of ``cmf_core.persistence.phpcr.enabled``.
70-
71-
PHPCR can be enabled by multiple ways such as:
72-
73-
.. configuration-block::
74-
75-
.. code-block:: yaml
76-
77-
phpcr: ~ # use default configuration
78-
# or
79-
phpcr: true # straight way
80-
# or
81-
phpcr:
82-
manager: ... # or any other option under 'phpcr'
83-
84-
.. code-block:: xml
85-
86-
<persistence>
87-
<!-- use default configuration -->
88-
<phpcr />
89-
90-
<!-- or setting it the straight way -->
91-
<phpcr>true</phpcr>
92-
93-
<!-- or setting an option under 'phpcr' -->
94-
<phpcr manager="..." />
95-
</persistence>
96-
97-
.. code-block:: php
98-
99-
$container->loadFromExtension('cmf_simple_cms', array(
100-
// ...
101-
'persistence' => array(
102-
'phpcr' => null, // use default configuration
103-
// or
104-
'phpcr' => true, // straight way
105-
// or
106-
'phpcr' => array(
107-
'manager' => '...', // or any other option under 'phpcr'
108-
),
109-
),
110-
));
69+
.. include:: partials/persistence_phpcr_enabled.rst.inc
11170

11271
session_name
11372
""""""""""""
11473

11574
**type**: ``string`` **default**: ``default``
11675

117-
The name of the connection.
76+
The name of the PHPCR connection to use.
77+
78+
.. _SonataDoctrinePHPCRAdminBundle: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html

0 commit comments

Comments
 (0)