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

Commitece2c81

Browse files
committed
minor#4722 Improve readability (ifdattic)
This PR was squashed before being merged into the 2.3 branch (closes#4722).Discussion----------Improve readability| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | 2.3| Fixed tickets |1. I personally find `// ...` much more understandable and less troublesome when hiding code from examples2. Remove horizontal scrolling3. Some small changesCommits-------6cd1a1d Improve readability
2 parentsdcc9516 +6cd1a1d commitece2c81

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

‎book/page_creation.rst

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ the bundle is registered with the kernel::
122122
public function registerBundles()
123123
{
124124
$bundles = array(
125-
...,
125+
//...
126126
new Acme\DemoBundle\AcmeDemoBundle(),
127127
);
128128
// ...
@@ -282,7 +282,9 @@ route is matched::
282282
{
283283
public function indexAction($limit)
284284
{
285-
return new Response('<html><body>Number: '.rand(1, $limit).'</body></html>');
285+
return new Response(
286+
'<html><body>Number: '.rand(1, $limit).'</body></html>'
287+
);
286288
}
287289
}
288290

@@ -420,7 +422,7 @@ Step through the Twig template line-by-line:
420422

421423
The parent template, ``::base.html.twig``, is missing both the **BundleName**
422424
and **ControllerName** portions of its name (hence the double colon (``::``)
423-
at the beginning). This means that the template lives outside of thebundles
425+
at the beginning). This means that the template lives outside of thebundle
424426
and in the ``app`` directory:
425427

426428
..configuration-block::
@@ -451,7 +453,8 @@ and in the ``app`` directory:
451453
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
452454
<title><?php $view['slots']->output('title', 'Welcome!') ?></title>
453455
<?php $view['slots']->output('stylesheets') ?>
454-
<link rel="shortcut icon" href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
456+
<link rel="shortcut icon"
457+
href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
455458
</head>
456459
<body>
457460
<?php $view['slots']->output('_content') ?>
@@ -718,8 +721,8 @@ Now that you've created the bundle, enable it via the ``AppKernel`` class::
718721
public function registerBundles()
719722
{
720723
$bundles = array(
721-
...,
722-
// register yourbundles
724+
//...
725+
// register yourbundle
723726
new Acme\TestBundle\AcmeTestBundle(),
724727
);
725728
// ...
@@ -824,9 +827,12 @@ format you prefer:
824827
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
825828
xmlns:framework="http://symfony.com/schema/dic/symfony"
826829
xmlns:twig="http://symfony.com/schema/dic/twig"
827-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
828-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
829-
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
830+
xsi:schemaLocation="http://symfony.com/schema/dic/services
831+
http://symfony.com/schema/dic/services/services-1.0.xsd
832+
http://symfony.com/schema/dic/symfony
833+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
834+
http://symfony.com/schema/dic/twig
835+
http://symfony.com/schema/dic/twig/twig-1.0.xsd">
830836
831837
<imports>
832838
<importresource="parameters.yml" />
@@ -1017,8 +1023,10 @@ the configuration file for the ``dev`` environment.
10171023
<containerxmlns="http://symfony.com/schema/dic/services"
10181024
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10191025
xmlns:framework="http://symfony.com/schema/dic/symfony"
1020-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1021-
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1026+
xsi:schemaLocation="http://symfony.com/schema/dic/services
1027+
http://symfony.com/schema/dic/services/services-1.0.xsd
1028+
http://symfony.com/schema/dic/symfony
1029+
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
10221030
10231031
<imports>
10241032
<importresource="config.xml" />
@@ -1038,7 +1046,7 @@ the configuration file for the ``dev`` environment.
10381046
$loader->import('config.php');
10391047
10401048
$container->loadFromExtension('framework', array(
1041-
'router'=> array(
1049+
'router' => array(
10421050
'resource' => '%kernel.root_dir%/config/routing_dev.php',
10431051
),
10441052
'profiler' => array('only-exceptions' => false),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp