Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37f2467

Browse files
committed
Merge pull requestsymfony#2045 from WouterJ/minor_fixes
Fixed minor code examples issues
2 parents98d118b +6ea490d commit37f2467

File tree

7 files changed

+48
-36
lines changed

7 files changed

+48
-36
lines changed

‎cookbook/bundles/best_practices.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ The end user can provide values in any configuration file:
263263
264264
..code-block::ini
265265
266-
; app/config/config.ini
266+
; app/config/parameters.ini
267267
[parameters]
268268
acme_hello.email.from = fabien@example.com
269269

‎cookbook/configuration/external_parameters.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,18 @@ The container also has support for setting PHP constants as parameters. To
9999
take advantage of this feature, map the name of your constant to a parameter
100100
key, and define the type as ``constant``.
101101

102-
..code-block::xml
102+
..code-block::xml
103103
104-
<?xml version="1.0" encoding="UTF-8"?>
104+
<?xml version="1.0" encoding="UTF-8"?>
105105
106-
<containerxmlns="http://symfony.com/schema/dic/services"
107-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
106+
<containerxmlns="http://symfony.com/schema/dic/services"
107+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
108108
109-
<parameters>
110-
<parameterkey="global.constant.value"type="constant">GLOBAL_CONSTANT</parameter>
111-
<parameterkey="my_class.constant.value"type="constant">My_Class::CONSTANT_NAME</parameter>
112-
</parameters>
113-
</container>
109+
<parameters>
110+
<parameterkey="global.constant.value"type="constant">GLOBAL_CONSTANT</parameter>
111+
<parameterkey="my_class.constant.value"type="constant">My_Class::CONSTANT_NAME</parameter>
112+
</parameters>
113+
</container>
114114
115115
..note::
116116

‎cookbook/form/form_collections.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ into new ``Tag`` objects and added to the ``tags`` property of the ``Task`` obje
418418
and call ``$em->persist($tag)`` on each, you'll receive an error from
419419
Doctrine:
420420

421-
A new entity was found through the relationship 'Acme\TaskBundle\Entity\Task#tags' that was not configured to cascade persist operations for entity...
421+
A new entity was found through the relationship `Acme\TaskBundle\Entity\Task#tags`
422+
that was not configured to cascade persist operations for entity...
422423

423424
To fix this, you may choose to "cascade" the persist operation automatically
424425
from the ``Task`` object to any related tags. To do this, add the ``cascade``

‎cookbook/security/entity_provider.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ for the purposes of this tutorial.
193193
Below is an export of my ``User`` table from MySQL. For details on how to
194194
create user records and encode their password, see:ref:`book-security-encoding-user-password`.
195195

196-
..code-block::text
196+
..code-block::bash
197197
198-
mysql> select * from user;
198+
$mysql>select* from user;
199199
+----+----------+----------------------------------+------------------------------------------+--------------------+-----------+
200200
| id| username| salt| password| email| is_active|
201201
+----+----------+----------------------------------+------------------------------------------+--------------------+-----------+

‎cookbook/symfony1.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ a bundle. With the help of a console command, the ``Resources/public/``
9090
directory of each bundle is copied or symbolically-linked to the ``web/bundles/``
9191
directory. This allows you to keep assets organized inside your bundle, but
9292
still make them available to the public. To make sure that all bundles are
93-
available, run the following command::
93+
available, run the following command:
9494

95-
php app/console assets:install web
95+
..code-block::bash
96+
97+
$ php app/console assets:install web
9698
9799
..note::
98100

@@ -185,16 +187,16 @@ Using the Console
185187
In symfony1, the console is in the root directory of your project and is
186188
called ``symfony``:
187189

188-
..code-block::text
190+
..code-block::bash
189191
190-
php symfony
192+
$php symfony
191193
192194
In Symfony2, the console is now in the app sub-directory and is called
193195
``console``:
194196

195-
..code-block::text
197+
..code-block::bash
196198
197-
php app/console
199+
$php app/console
198200
199201
Applications
200202
------------
@@ -262,7 +264,9 @@ In symfony1, the ``routing.yml`` and ``app.yml`` configuration files were
262264
automatically loaded inside any plugin. In Symfony2, routing and application
263265
configuration inside a bundle must be included manually. For example, to
264266
include a routing resource from a bundle called ``AcmeDemoBundle``, you can
265-
do the following::
267+
do the following:
268+
269+
..code-block::yaml
266270
267271
# app/config/routing.yml
268272
_hello:

‎cookbook/testing/bootstrap.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ with ``tests.bootstrap.php``:
2525
..code-block::xml
2626
2727
<!-- app/phpunit.xml.dist-->
28-
bootstrap = "tests.bootstrap.php"
28+
29+
<!-- ...-->
30+
<phpunit
31+
...
32+
bootstrap ="tests.bootstrap.php"
33+
>
2934
3035
Now, you can define in your ``phpunit.xml.dist`` file which environment you want the
3136
cache to be cleared:

‎reference/dic_tags.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -580,26 +580,28 @@ Your custom loader's ``load`` method is responsible for returning a
580580

581581
Now, register your loader as a service and tag it with ``translation.loader``:
582582

583-
..code-block::yaml
583+
..configuration-block::
584+
585+
..code-block::yaml
584586
585-
services:
586-
main.translation.my_custom_loader:
587-
class:Acme\MainBundle\Translation\MyCustomLoader
588-
tags:
589-
-{ name: translation.loader, alias: bin }
587+
services:
588+
main.translation.my_custom_loader:
589+
class:Acme\MainBundle\Translation\MyCustomLoader
590+
tags:
591+
-{ name: translation.loader, alias: bin }
590592
591-
..code-block::xml
593+
..code-block::xml
592594
593-
<serviceid="main.translation.my_custom_loader"class="Acme\MainBundle\Translation\MyCustomLoader">
594-
<tagname="translation.loader"alias="bin" />
595-
</service>
595+
<serviceid="main.translation.my_custom_loader"class="Acme\MainBundle\Translation\MyCustomLoader">
596+
<tagname="translation.loader"alias="bin" />
597+
</service>
596598
597-
..code-block::php
599+
..code-block::php
598600
599-
$container
600-
->register('main.translation.my_custom_loader', 'Acme\MainBundle\Translation\MyCustomLoader')
601-
->addTag('translation.loader', array('alias' => 'bin'))
602-
;
601+
$container
602+
->register('main.translation.my_custom_loader', 'Acme\MainBundle\Translation\MyCustomLoader')
603+
->addTag('translation.loader', array('alias' => 'bin'))
604+
;
603605
604606
The ``alias`` option is required and very important: it defines the file
605607
"suffix" that will be used for the resource files that use this loader. For

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp