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

Commit aa122c4

Browse files
committed
Fix invalid code examples
1 parent b2c9dd3 commit aa122c4

File tree

4 files changed

+22
-37
lines changed

4 files changed

+22
-37
lines changed

book/handling_multilang.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Now what is left to do is to update the sonata routes to become locale aware:
259259
<route id="admin_dashboard" pattern="/{_locale}/admin/">
260260
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
261261
<default key="route">sonata_admin_dashboard</default>
262-
<default "permanent">true</default>
262+
<default key="permanent">true</default>
263263
</route>
264264
265265
<import resource="@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
@@ -272,19 +272,19 @@ Now what is left to do is to update the sonata routes to become locale aware:
272272
<route id="admin_without_locale" pattern="/admin">
273273
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
274274
<default key="route">sonata_admin_dashboard</default>
275-
<default "permanent">true</default>
275+
<default key="permanent">true</default>
276276
</route>
277+
277278
<route id="admin_dashboard_without_locale" pattern="/admin/dashboard">
278279
<default key="_controller">FrameworkBundle:Redirect:redirect</default>
279280
<default key="route">sonata_admin_dashboard</default>
280-
<default "permanent">true</default>
281+
<default key="permanent">true</default>
281282
</route>
282283
</routes>
283284
284285
.. code-block:: php
285286
286287
// app/config/routing.php
287-
288288
$collection = new RouteCollection();
289289
290290
$collection->add('admin_dashboard', new Route('/{_locale}/admin/', array(

bundles/blog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ You can include the default in the main configuration file as follows:
118118
# app/config/config.yml
119119
imports:
120120
# ...
121-
- { resource: @CmfBlogBundle/Resources/config/routing/autoroute_default.yml }
121+
- { resource: '@CmfBlogBundle/Resources/config/routing/autoroute_default.yml' }
122122
# ...
123123
124124
.. code-block:: xml

bundles/create/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ Metadata Handling
173173
cmf_create:
174174
auto_mapping: true
175175
rdf_config_dirs:
176-
- "%kernel.root_dir%/Resources/rdf-mappings"
176+
- '%kernel.root_dir%/Resources/rdf-mappings'
177177
map:
178-
"<http://rdfs.org/sioc/ns#Post>": "Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent"
178+
'<http://rdfs.org/sioc/ns#Post>': 'Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent'
179179
180180
.. code-block:: xml
181181

bundles/phpcr_odm/configuration.rst

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ session
2929
# optional parameters for Jackalope
3030
parameters:
3131
jackalope.factory: Jackalope\Factory
32-
jackalope.check_login_on_server: %kernel.debug%
32+
jackalope.check_login_on_server: '%kernel.debug%'
3333
jackalope.disable_stream_wrapper: false
3434
jackalope.auto_lastmodified: true
3535
# see below for how to configure the backend of your choice
@@ -43,29 +43,19 @@ session
4343
.. code-block:: xml
4444
4545
<!-- app/config/config.xml -->
46-
<?xml version="1.0" encoding="UTF-8" ?>
46+
<?xml version="1.0" charset="UTF-8" ?>
4747
<container xmlns="http://symfony.com/schema/dic/services">
4848
4949
<config xmlns="http://doctrine-project.org/schema/symfony-dic/odm/phpcr">
50-
51-
<session
52-
workspace="default"
53-
username="admin"
54-
password="admin"
55-
>
56-
57-
<backend
58-
type="X"
59-
>
50+
<session workspace="default" username="admin" password="admin">
51+
<backend type="X">
6052
<parameter key="jackalope.factory">Jackalope\Factory</parameter>
6153
<parameter key="jackalope.check_login_on_server">%kernel.debug%</parameter>
6254
<parameter key="jackalope.disable_stream_wrapper">false</parameter>
6355
<parameter key="jackalope.auto_lastmodified">true</parameter>
6456
</backend>
6557
66-
<options
67-
jackalope.fetch_depth="1"
68-
/>
58+
<options jackalope.fetch_depth="1" />
6959
</session>
7060
</config>
7161
</container>
@@ -465,28 +455,23 @@ not configure anything here, the ODM services will not be loaded.
465455
.. code-block:: xml
466456
467457
<!-- app/config/config.xml -->
468-
<?xml version="1.0" encoding="UTF-8" ?>
458+
<?xml version="1.0" charset="UTF-8" ?>
469459
<container xmlns="http://symfony.com/schema/dic/services">
470-
471460
<config xmlns="http://doctrine-project.org/schema/symfony-dic/odm/phpcr">
472-
473-
<odm
474-
configuration-id="null"
461+
<odm configuration-id="null"
475462
auto-mapping="true"
476463
auto-generate-proxy-classes="%kernel.debug%"
477464
proxy-dir="%kernel.cache_dir%/doctrine/PHPCRProxies"
478465
proxy-namespace="PHPCRProxies"
479466
>
480-
<mappings>
481-
<"name"
482-
mapping="true"
483-
type="null"
484-
dir="null"
485-
alias="null"
486-
prefix="null"
487-
is-bundle="null"
488-
/>
489-
</mappings>
467+
<mapping name="<name>"
468+
mapping="true"
469+
type="null"
470+
dir="null"
471+
alias="null"
472+
prefix="null"
473+
is-bundle="null"
474+
/>
490475
491476
<metadata-cache-driver
492477
type="array"

0 commit comments

Comments
 (0)