From 8dbbbc8a82225acd77493eccbfc778c38ab50dba Mon Sep 17 00:00:00 2001 From: Philipp Rieber Date: Sat, 30 Nov 2013 08:59:40 +0100 Subject: [PATCH 1/3] Fix formatting --- cookbook/logging/monolog.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/logging/monolog.rst b/cookbook/logging/monolog.rst index b36ee23df9b..dafc94a2ea8 100644 --- a/cookbook/logging/monolog.rst +++ b/cookbook/logging/monolog.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~~ From bcf3633805662e77f61cbfb87e014b2ad7e47b85 Mon Sep 17 00:00:00 2001 From: Philipp Rieber Date: Sat, 30 Nov 2013 17:27:16 +0100 Subject: [PATCH 2/3] Remove confusing sample code --- cookbook/form/form_customization.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 4d93cb3704b..71d14d7e6d0 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -666,9 +666,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 %}
{{ form_label(form) }} From 883402ca9c09b439bf532bf4e1caf09ac14c7b7a Mon Sep 17 00:00:00 2001 From: Philipp Rieber Date: Mon, 2 Dec 2013 20:59:54 +0100 Subject: [PATCH 3/3] Improve fixes --- cookbook/form/form_customization.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 71d14d7e6d0..b0748884347 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -41,9 +41,9 @@ You can also render each of the three parts of the field individually: .. code-block:: php
- label($form['age']) }} ?> - errors($form['age']) }} ?> - widget($form['age']) }} ?> + label($form['age']); ?> + errors($form['age']); ?> + widget($form['age']); ?>
In both cases, the form label, errors and HTML widget are rendered by using @@ -71,7 +71,7 @@ just one line: .. code-block:: php - widget($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 @@ -645,7 +645,6 @@ which part of the field is being customized. For example: widget($form['name']); ?> -
echo $view['form']->block('form_widget_simple') ?>
@@ -666,6 +665,8 @@ You can also override the markup for an entire field row using the same method: .. code-block:: html+jinja + {% form_theme form _self %} + {% block _product_name_row %}
{{ form_label(form) }} @@ -674,10 +675,16 @@ You can also override the markup for an entire field row using the same method:
{% endblock %} + {{ form_row(form.name) }} + .. code-block:: html+php - + + setTheme($form, array('AcmeDemoBundle:Form')); ?> + + row($form['name']); ?> +
label($form) ?> errors($form) ?>