@@ -17,10 +17,25 @@ This bundle consists of two parts:
17
17
Installation
18
18
------------
19
19
20
- You can install the bundle in 2 different ways:
21
-
22
- * Use the official Git repository (https://github.com/symfony-cmf/TreeBrowserBundle);
23
- * Install it via Composer (``symfony-cmf/tree-browser-bundle `` on `Packagist `_).
20
+ You can install this bundle `with composer `_ using the
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
+ }
24
39
25
40
Routing
26
41
-------
@@ -215,44 +230,11 @@ For example, if your want to open a custom action:
215
230
216
231
.. note ::
217
232
218
- Don't forget to add your custom route to the
219
- ``fos_js_routing.routes_to_expose `` configuration:
220
-
221
- .. configuration-block ::
222
-
223
- .. code-block :: yaml
224
-
225
- fos_js_routing :
226
- routes_to_expose :
227
- - cmf_tree_browser.phpcr_children
228
- - cmf_tree_browser.phpcr_move
229
- - sonata.admin.doctrine_phpcr.phpcrodm_children
230
- - sonata.admin.doctrine_phpcr.phpcrodm_move
231
- - presta_cms_page_edit
232
-
233
- .. code-block :: xml
234
-
235
- <config xmlns =" http://example.org/schema/dic/fos_js_routing" >
236
- <routes-to-expose >cmf_tree_browser.phpcr_children</routes-to-expose >
237
- <routes-to-expose >cmf_tree_browser.phpcr_move</routes-to-expose >
238
- <routes-to-expose >sonata.admin.doctrine_phpcr.phpcrodm_children</routes-to-expose >
239
- <routes-to-expose >sonata.admin.doctrine_phpcr.phpcrodm_move</routes-to-expose >
240
- <routes-to-expose >presta_cms_page_edit</routes-to-expose >
241
- </config >
242
-
243
- .. code-block :: php
244
-
245
- $container->loadFromExtension('fos_js_routing', array(
246
- 'routes_to_expose' => array(
247
- 'cmf_tree_browser.phpcr_children',
248
- 'cmf_tree_browser.phpcr_move',
249
- 'sonata.admin.doctrine_phpcr.phpcrodm_children',
250
- 'sonata.admin.doctrine_phpcr.phpcrodm_move',
251
- 'presta_cms_page_edit',
252
- ),
253
- ));
233
+ This bundle automatically exposes routes with the FOSJsRoutingBundle _
234
+ to allow the tree to work.
254
235
255
236
.. _`Packagist` : https://packagist.org/packages/symfony-cmf/tree-browser-bundle
237
+ .. _`with composer` : http://getcomposer.org
256
238
.. _`FOSJsRoutingBundle` : https://github.com/FriendsOfSymfony/FOSJsRoutingBundle
257
239
.. _`admin_tree.js` : https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Resources/views/Tree/tree.html.twig
258
240
.. _`select_tree.js` : https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Resources/views/Form/form_admin_fields.html.twig
0 commit comments