Skip to content

Commit bd0210f

Browse files
ifdatticxabbuh
authored andcommitted
Update forms.rst
Conflicts: book/forms.rst
1 parent 19e879b commit bd0210f

File tree

2 files changed

+19
-38
lines changed

2 files changed

+19
-38
lines changed

book/forms.rst

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,13 +1170,10 @@ easy to use in your application.
11701170
<?xml version="1.0" encoding="UTF-8" ?>
11711171
<container xmlns="http://symfony.com/schema/dic/services"
11721172
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1173-
xsi:schemaLocation="http://symfony.com/schema/dic/services
1174-
http://symfony.com/schema/dic/services/services-1.0.xsd">
1173+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
11751174
11761175
<services>
1177-
<service id="app.form.type.task"
1178-
class="AppBundle\Form\Type\TaskType">
1179-
1176+
<service id="app.form.type.task" class="AppBundle\Form\Type\TaskType">
11801177
<tag name="form.type" alias="task" />
11811178
</service>
11821179
</services>
@@ -1480,7 +1477,7 @@ renders the form:
14801477
{# app/Resources/views/default/new.html.twig #}
14811478
{% form_theme form 'form/fields.html.twig' %}
14821479

1483-
{# or if providing multiple themes #}
1480+
{# or if you want to use multiple themes #}
14841481
{% form_theme form 'form/fields.html.twig' 'Form/fields2.html.twig' %}
14851482

14861483
{# ... render the form #}
@@ -1490,7 +1487,7 @@ renders the form:
14901487
<!-- app/Resources/views/default/new.html.php -->
14911488
<?php $view['form']->setTheme($form, array('form')) ?>
14921489

1493-
<!-- or if providing multiple themes -->
1490+
<!-- or if you want to use multiple themes -->
14941491
<?php $view['form']->setTheme($form, array('form', 'form2')) ?>
14951492

14961493
<!-- ... render the form -->
@@ -1633,10 +1630,8 @@ file:
16331630
<container xmlns="http://symfony.com/schema/dic/services"
16341631
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16351632
xmlns:twig="http://symfony.com/schema/dic/twig"
1636-
xsi:schemaLocation="http://symfony.com/schema/dic/services
1637-
http://symfony.com/schema/dic/services/services-1.0.xsd
1638-
http://symfony.com/schema/dic/twig
1639-
http://symfony.com/schema/dic/twig/twig-1.0.xsd">
1633+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1634+
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
16401635
16411636
<twig:config>
16421637
<twig:form>
@@ -1721,10 +1716,8 @@ file:
17211716
<container xmlns="http://symfony.com/schema/dic/services"
17221717
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17231718
xmlns:framework="http://symfony.com/schema/dic/symfony"
1724-
xsi:schemaLocation="http://symfony.com/schema/dic/services
1725-
http://symfony.com/schema/dic/services/services-1.0.xsd
1726-
http://symfony.com/schema/dic/symfony
1727-
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1719+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1720+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
17281721
17291722
<framework:config>
17301723
<framework:templating>

book/templating.rst

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,8 @@ tags:
745745
<container xmlns="http://symfony.com/schema/dic/services"
746746
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
747747
xmlns:framework="http://symfony.com/schema/dic/symfony"
748-
xsi:schemaLocation="http://symfony.com/schema/dic/services
749-
http://symfony.com/schema/dic/services/services-1.0.xsd
750-
http://symfony.com/schema/dic/symfony
751-
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
748+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
749+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
752750
753751
<!-- ... -->
754752
<framework:config>
@@ -784,10 +782,8 @@ in your application configuration:
784782
<container xmlns="http://symfony.com/schema/dic/services"
785783
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
786784
xmlns:framework="http://symfony.com/schema/dic/symfony"
787-
xsi:schemaLocation="http://symfony.com/schema/dic/services
788-
http://symfony.com/schema/dic/services/services-1.0.xsd
789-
http://symfony.com/schema/dic/symfony
790-
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
785+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
786+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
791787
792788
<!-- ... -->
793789
<framework:config>
@@ -827,7 +823,7 @@ any global default template that is defined):
827823
new ControllerReference('...'),
828824
array(
829825
'renderer' => 'hinclude',
830-
'default' => 'default/content.html.twig',
826+
'default' => 'default/content.html.twig',
831827
)
832828
) ?>
833829
@@ -1018,18 +1014,13 @@ but Symfony provides a more dynamic option via the ``asset`` Twig function:
10181014

10191015
<img src="{{ asset('images/logo.png') }}" alt="Symfony!" />
10201016

1021-
<link href="{{ asset('css/blog.css') }}"
1022-
rel="stylesheet"
1023-
type="text/css" />
1017+
<link href="{{ asset('css/blog.css') }}" rel="stylesheet" />
10241018

10251019
.. code-block:: html+php
10261020

1027-
<img src="<?php echo $view['assets']->getUrl('images/logo.png') ?>"
1028-
alt="Symfony!" />
1021+
<img src="<?php echo $view['assets']->getUrl('images/logo.png') ?>" alt="Symfony!" />
10291022

1030-
<link href="<?php echo $view['assets']->getUrl('css/blog.css') ?>"
1031-
rel="stylesheet"
1032-
type="text/css" />
1023+
<link href="<?php echo $view['assets']->getUrl('css/blog.css') ?>" rel="stylesheet" />
10331024

10341025
The ``asset`` function's main purpose is to make your application more portable.
10351026
If your application lives at the root of your host (e.g. http://example.com),
@@ -1154,8 +1145,7 @@ is by default "web").
11541145

11551146
.. code-block:: html+jinja
11561147

1157-
<link href="{{ asset('bundles/acmedemo/css/contact.css') }}"
1158-
rel="stylesheet" />
1148+
<link href="{{ asset('bundles/acmedemo/css/contact.css') }}" rel="stylesheet" />
11591149

11601150
The end result is a page that includes both the ``main.css`` and ``contact.css``
11611151
stylesheets.
@@ -1249,10 +1239,8 @@ configuration file:
12491239
<container xmlns="http://symfony.com/schema/dic/services"
12501240
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12511241
xmlns:framework="http://symfony.com/schema/dic/symfony"
1252-
xsi:schemaLocation="http://symfony.com/schema/dic/services
1253-
http://symfony.com/schema/dic/services/services-1.0.xsd
1254-
http://symfony.com/schema/dic/symfony
1255-
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1242+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
1243+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
12561244
12571245
<!-- ... -->
12581246
<framework:config>

0 commit comments

Comments
 (0)