Skip to content

Mini fixes #3251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 18, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions cookbook/form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ You can also render each of the three parts of the field individually:
.. code-block:: php

<div>
<?php echo $view['form']->label($form['age']) }} ?>
<?php echo $view['form']->errors($form['age']) }} ?>
<?php echo $view['form']->widget($form['age']) }} ?>
<?php echo $view['form']->label($form['age']); ?>
<?php echo $view['form']->errors($form['age']); ?>
<?php echo $view['form']->widget($form['age']); ?>
</div>

In both cases, the form label, errors and HTML widget are rendered by using
Expand Down Expand Up @@ -71,7 +71,7 @@ just one line:

.. code-block:: php

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

The remainder of this recipe will explain how every part of the form's markup
can be modified at several different levels. For more information about form
Expand Down Expand Up @@ -645,7 +645,6 @@ which part of the field is being customized. For example:
<?php echo $view['form']->widget($form['name']); ?>

<!-- src/Acme/DemoBundle/Resources/views/Form/_product_name_widget.html.php -->

<div class="text_widget">
echo $view['form']->block('form_widget_simple') ?>
</div>
Expand All @@ -666,7 +665,6 @@ You can also override the markup for an entire field row using the same method:

.. code-block:: html+jinja

{# _product_name_row.html.twig #}
{% form_theme form _self %}

{% block _product_name_row %}
Expand All @@ -677,10 +675,16 @@ You can also override the markup for an entire field row using the same method:
</div>
{% endblock %}

{{ form_row(form.name) }}

.. code-block:: html+php

<!-- _product_name_row.html.php -->
<!-- Main template -->
<?php echo $view['form']->setTheme($form, array('AcmeDemoBundle:Form')); ?>

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

<!-- src/Acme/DemoBundle/Resources/views/Form/_product_name_row.html.php -->
<div class="name_row">
<?php echo $view['form']->label($form) ?>
<?php echo $view['form']->errors($form) ?>
Expand Down
4 changes: 2 additions & 2 deletions cookbook/logging/monolog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ The basic handler is the ``StreamHandler`` which writes logs in a stream
Monolog comes also with a powerful built-in handler for the logging in
prod environment: ``FingersCrossedHandler``. It allows you to store the
messages in a buffer and to log them only if a message reaches the
action level (ERROR in the configuration provided in the standard
edition) by forwarding the messages to another handler.
action level (``error`` in the configuration provided in the Standard
Edition) by forwarding the messages to another handler.

Using several handlers
~~~~~~~~~~~~~~~~~~~~~~
Expand Down