Skip to content

Commit ece2c81

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 examples 2. Remove horizontal scrolling 3. Some small changes Commits ------- 6cd1a1d Improve readability
2 parents dcc9516 + 6cd1a1d commit ece2c81

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

book/page_creation.rst

+20-12
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 the bundles
425+
at the beginning). This means that the template lives outside of the bundle
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 your bundles
724+
// ...
725+
// register your bundle
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
<import resource="parameters.yml" />
@@ -1017,8 +1023,10 @@ the configuration file for the ``dev`` environment.
10171023
<container xmlns="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
<import resource="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)