Skip to content

Commit b078da3

Browse files
committed
store templates under app/Resources/views
1 parent fa7cb77 commit b078da3

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

cookbook/form/create_custom_field_type.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ link for details), create a ``gender_widget`` block to handle this:
111111

112112
.. code-block:: html+jinja
113113

114-
{# src/AppBundle/Resources/views/Form/fields.html.twig #}
114+
{# app/Resources/views/Form/fields.html.twig #}
115115
{% block gender_widget %}
116116
{% spaceless %}
117117
{% if expanded %}
@@ -132,7 +132,7 @@ link for details), create a ``gender_widget`` block to handle this:
132132

133133
.. code-block:: html+php
134134

135-
<!-- src/AppBundle/Resources/views/Form/gender_widget.html.php -->
135+
<!-- app/Resources/views/Form/gender_widget.html.php -->
136136
<?php if ($expanded) : ?>
137137
<ul <?php $view['form']->block($form, 'widget_container_attributes') ?>>
138138
<?php foreach ($form as $child) : ?>

cookbook/form/dynamic_form_modification.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ field according to the current selection in the ``sport`` field:
632632

633633
.. code-block:: html+jinja
634634

635-
{# src/AppBundle/Resources/views/Meetup/create.html.twig #}
635+
{# app/Resources/views/Meetup/create.html.twig #}
636636
{{ form_start(form) }}
637637
{{ form_row(form.sport) }} {# <select id="meetup_sport" ... #}
638638
{{ form_row(form.position) }} {# <select id="meetup_position" ... #}
@@ -667,7 +667,7 @@ field according to the current selection in the ``sport`` field:
667667

668668
.. code-block:: html+php
669669

670-
<!-- src/AppBundle/Resources/views/Meetup/create.html.php -->
670+
<!-- app/Resources/views/Meetup/create.html.php -->
671671
<?php echo $view['form']->start($form) ?>
672672
<?php echo $view['form']->row($form['sport']) ?> <!-- <select id="meetup_sport" ... -->
673673
<?php echo $view['form']->row($form['position']) ?> <!-- <select id="meetup_position" ... -->

cookbook/form/form_customization.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ can now re-use the form customization across many templates:
282282

283283
.. code-block:: html+jinja
284284

285-
{# src/AppBundle/Resources/views/Form/fields.html.twig #}
285+
{# app/Resources/views/Form/fields.html.twig #}
286286
{% block integer_widget %}
287287
<div class="integer_widget">
288288
{% set type = type|default('number') %}
@@ -354,7 +354,7 @@ file in order to customize the ``integer_widget`` fragment.
354354

355355
.. code-block:: html+php
356356

357-
<!-- src/AppBundle/Resources/views/Form/integer_widget.html.php -->
357+
<!-- app/Resources/views/Form/integer_widget.html.php -->
358358
<div class="integer_widget">
359359
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : "number")) ?>
360360
</div>
@@ -426,7 +426,7 @@ the base block by using the ``parent()`` Twig function:
426426

427427
.. code-block:: html+jinja
428428

429-
{# src/AppBundle/Resources/views/Form/fields.html.twig #}
429+
{# app/Resources/views/Form/fields.html.twig #}
430430
{% extends 'form_div_layout.html.twig' %}
431431

432432
{% block integer_widget %}
@@ -543,7 +543,7 @@ PHP
543543
~~~
544544

545545
By using the following configuration, any customized form fragments inside the
546-
``src/AppBundle/Resources/views/Form`` folder will be used globally when a
546+
``app/Resources/views/Form`` folder will be used globally when a
547547
form is rendered.
548548

549549
.. configuration-block::
@@ -670,7 +670,7 @@ customize the ``name`` field only:
670670

671671
<?php echo $view['form']->widget($form['name']); ?>
672672

673-
<!-- src/AppBundle/Resources/views/Form/_product_name_widget.html.php -->
673+
<!-- app/Resources/views/Form/_product_name_widget.html.php -->
674674
<div class="text_widget">
675675
echo $view['form']->block('form_widget_simple') ?>
676676
</div>
@@ -727,7 +727,7 @@ You can also override the markup for an entire field row using the same method:
727727

728728
<?php echo $view['form']->row($form['name']); ?>
729729

730-
<!-- src/AppBundle/Resources/views/Form/_product_name_row.html.php -->
730+
<!-- app/Resources/views/Form/_product_name_row.html.php -->
731731
<div class="name_row">
732732
<?php echo $view['form']->label($form) ?>
733733
<?php echo $view['form']->errors($form) ?>

cookbook/templating/PHP.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ the ``extend()`` call:
119119

120120
.. code-block:: html+php
121121

122-
<!-- src/AppBundle/Resources/views/Hello/index.html.php -->
122+
<!-- app/Resources/views/Hello/index.html.php -->
123123
<?php $view->extend('AppBundle::layout.html.php') ?>
124124

125125
Hello <?php echo $name ?>!
@@ -133,7 +133,7 @@ Now, have a look at the ``layout.html.php`` file:
133133

134134
.. code-block:: html+php
135135

136-
<!-- src/AppBundle/Resources/views/layout.html.php -->
136+
<!-- app/Resources/views/layout.html.php -->
137137
<?php $view->extend('::base.html.php') ?>
138138

139139
<h1>Hello Application</h1>
@@ -181,7 +181,7 @@ decorating the template. In the ``index.html.php`` template, define a
181181

182182
.. code-block:: html+php
183183

184-
<!-- src/AppBundle/Resources/views/Hello/index.html.php -->
184+
<!-- app/Resources/views/Hello/index.html.php -->
185185
<?php $view->extend('AppBundle::layout.html.php') ?>
186186

187187
<?php $view['slots']->set('title', 'Hello World Application') ?>
@@ -223,14 +223,14 @@ Create a ``hello.html.php`` template:
223223

224224
.. code-block:: html+php
225225

226-
<!-- src/AppBundle/Resources/views/Hello/hello.html.php -->
226+
<!-- app/Resources/views/Hello/hello.html.php -->
227227
Hello <?php echo $name ?>!
228228

229229
And change the ``index.html.php`` template to include it:
230230

231231
.. code-block:: html+php
232232

233-
<!-- src/AppBundle/Resources/views/Hello/index.html.php -->
233+
<!-- app/Resources/views/Hello/index.html.php -->
234234
<?php $view->extend('AppBundle::layout.html.php') ?>
235235

236236
<?php echo $view->render('AppBundle:Hello:hello.html.php', array('name' => $name)) ?>
@@ -253,7 +253,7 @@ If you create a ``fancy`` action, and want to include it into the
253253

254254
.. code-block:: html+php
255255

256-
<!-- src/AppBundle/Resources/views/Hello/index.html.php -->
256+
<!-- app/Resources/views/Hello/index.html.php -->
257257
<?php echo $view['actions']->render(
258258
new \Symfony\Component\HttpKernel\Controller\ControllerReference('AppBundle:Hello:fancy', array(
259259
'name' => $name,

0 commit comments

Comments
 (0)