Skip to content

Commit ee25fc6

Browse files
committed
Merge pull request symfony#3251 from bicpi/mini_fixes
Mini fixes
2 parents 959a2c3 + 883402c commit ee25fc6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

cookbook/form/form_customization.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ You can also render each of the three parts of the field individually:
4141
.. code-block:: php
4242
4343
<div>
44-
<?php echo $view['form']->label($form['age']) }} ?>
45-
<?php echo $view['form']->errors($form['age']) }} ?>
46-
<?php echo $view['form']->widget($form['age']) }} ?>
44+
<?php echo $view['form']->label($form['age']); ?>
45+
<?php echo $view['form']->errors($form['age']); ?>
46+
<?php echo $view['form']->widget($form['age']); ?>
4747
</div>
4848
4949
In both cases, the form label, errors and HTML widget are rendered by using
@@ -71,7 +71,7 @@ just one line:
7171
7272
.. code-block:: php
7373
74-
<?php echo $view['form']->widget($form) }} ?>
74+
<?php echo $view['form']->widget($form); ?>
7575
7676
The remainder of this recipe will explain how every part of the form's markup
7777
can be modified at several different levels. For more information about form
@@ -646,7 +646,6 @@ customize the ``name`` field only:
646646
<?php echo $view['form']->widget($form['name']); ?>
647647

648648
<!-- src/Acme/DemoBundle/Resources/views/Form/_product_name_widget.html.php -->
649-
650649
<div class="text_widget">
651650
echo $view['form']->block('form_widget_simple') ?>
652651
</div>
@@ -667,7 +666,6 @@ You can also override the markup for an entire field row using the same method:
667666

668667
.. code-block:: html+jinja
669668

670-
{# _product_name_row.html.twig #}
671669
{% form_theme form _self %}
672670

673671
{% block _product_name_row %}
@@ -678,10 +676,16 @@ You can also override the markup for an entire field row using the same method:
678676
</div>
679677
{% endblock %}
680678

679+
{{ form_row(form.name) }}
680+
681681
.. code-block:: html+php
682682

683-
<!-- _product_name_row.html.php -->
683+
<!-- Main template -->
684+
<?php echo $view['form']->setTheme($form, array('AcmeDemoBundle:Form')); ?>
685+
686+
<?php echo $view['form']->row($form['name']); ?>
684687

688+
<!-- src/Acme/DemoBundle/Resources/views/Form/_product_name_row.html.php -->
685689
<div class="name_row">
686690
<?php echo $view['form']->label($form) ?>
687691
<?php echo $view['form']->errors($form) ?>

cookbook/logging/monolog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ The basic handler is the ``StreamHandler`` which writes logs in a stream
4646
Monolog comes also with a powerful built-in handler for the logging in
4747
prod environment: ``FingersCrossedHandler``. It allows you to store the
4848
messages in a buffer and to log them only if a message reaches the
49-
action level (ERROR in the configuration provided in the standard
50-
edition) by forwarding the messages to another handler.
49+
action level (``error`` in the configuration provided in the Standard
50+
Edition) by forwarding the messages to another handler.
5151

5252
Using several handlers
5353
~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)