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

Commit 56969e5

Browse files
committed
removing obsolete information
1 parent f8b82b7 commit 56969e5

File tree

5 files changed

+7
-42
lines changed

5 files changed

+7
-42
lines changed

bundles/create/developing-hallo.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ To use this template, specify ``hallo-coffee`` as editor in the
2323
2424
{% render(controller(
2525
"cmf_create.jsloader.controller:includeJSFilesAction",
26-
{'editor': 'hallo-coffee', '_locale': app.request.locale }
26+
{'editor': 'hallo-coffee' }
2727
)) %}
2828
2929
.. code-block:: php
3030
3131
<?php $view['actions']->render(
3232
new ControllerReference('cmf_create.jsloader.controller:includeJSFilesAction", array(
3333
'editor' => 'hallo-coffee',
34-
'_locale' => $app->getRequest()->getLocale(),
3534
))
3635
) ?>
3736

bundles/create/introduction.rst

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -349,40 +349,20 @@ higher, the method reads:
349349

350350
.. code-block:: jinja
351351
352-
{% render(controller(
353-
"cmf_create.jsloader.controller:includeJSFilesAction",
354-
{'_locale': app.request.locale}
355-
)) %}
352+
{% render(controller("cmf_create.jsloader.controller:includeJSFilesAction")) %}
356353
357354
.. code-block:: php
358355
359356
<?php $view['actions']->render(
360-
new ControllerReference('cmf_create.jsloader.controller:includeJSFilesAction', array(
361-
'_locale' => $app->getRequest()->getLocale(),
362-
))
363-
) ?>
364-
365-
For Symfony 2.1, the syntax is:
366-
367-
.. configuration-block::
368-
369-
.. code-block:: jinja
370-
371-
{% render "cmf_create.jsloader.controller:includeJSFilesAction" with {'_locale': app.request.locale} %}
372-
373-
.. code-block:: php
374-
375-
<?php
376-
$view['actions']->render('cmf_create.jsloader.controller:includeJSFilesAction', array(
377-
'_locale' => $app->getRequest()->getLocale(),
357+
new ControllerReference('cmf_create.jsloader.controller:includeJSFilesAction')
378358
) ?>
379359
380360
.. tip::
381361

382362
You can include this call unconditionally. The controller checks if the
383363
current user is allowed to edit and only in that case includes the
384364
JavaScript.
385-
365+
386366
.. note::
387367

388368
The provided JavaScript file configures create.js and the editor. If you

bundles/create/other-editors.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ In your template, load the JavaScript files using:
4242

4343
.. code-block:: jinja
4444
45-
{% render(controller(
46-
"cmf_create.jsloader.controller:includeJSFilesAction",
47-
{"editor": "hallo", "_locale":app.request.locale}
48-
)) %}
45+
{% render(controller("cmf_create.jsloader.controller:includeJSFilesAction")) %}
4946
5047
.. code-block:: php
5148
@@ -99,15 +96,14 @@ editor parameter:
9996
10097
{% render(controller(
10198
"cmf_create.jsloader.controller:includeJSFilesAction",
102-
{'editor': 'myeditor', '_locale': app.request.locale }
99+
{'editor': 'myeditor' }
103100
)) %}
104101
105102
.. code-block:: php
106103
107104
<?php $view['actions']->render(
108105
new ControllerReference('cmf_create.jsloader.controller:includeJSFilesAction', array(
109106
'editor' => 'myeditor',
110-
'_locale' => $app->getRequest()->getLocale(),
111107
))
112108
); ?>
113109

bundles/tree_browser/introduction.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ from the admin tree:
148148

149149
{% render 'sonata.admin.doctrine_phpcr.tree_controller:treeAction' with {
150150
'root': sitePath ~ "/menu",
151-
'selected': menuNodeId,
152-
'_locale': app.request.locale
151+
'selected': menuNodeId
153152
} %}
154153
<script type="text/javascript">
155154
$(document).ready(function() {
@@ -169,7 +168,6 @@ from the admin tree:
169168
$view['actions']->render('sonata.admin.doctrine_phpcr.tree_controller:treeAction', array(
170169
'root' => $sitePath . '/menu',
171170
'selected' => $menuNodeId,
172-
'_locale' => $app->getRequest()->getLocale()
173171
))?>
174172
<script type="text/javascript">
175173
$(document).ready(function() {

cookbook/handling_multilang_documents.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ several CMF bundles wanting the list of allowed locales, we recommend putting
4040
them into a parameter ``%locales%``, see the `cmf-sandbox config.yml file`_
4141
for an example.
4242

43-
.. tip::
44-
45-
Whenever you do a sub-request, for example to call a controller from a twig
46-
template, do not forget to pass the ``app.request.locale`` along or you will
47-
lose the request locale and fall back to the default.
48-
See for example the action to include the create.js JavaScript files in the
49-
:ref:`create.js reference <bundle-create-usage-embed>`.
50-
5143
PHPCR-ODM multi-language Documents
5244
----------------------------------
5345

0 commit comments

Comments
 (0)