Skip to content

Commit

Permalink
Merge branch '2.3' into 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jan 7, 2014
2 parents b028282 + 3a2f53d commit f08e2a5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
8 changes: 4 additions & 4 deletions book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ output can be customized on many different levels.
.. code-block:: html+php

<?php echo $view['form']->get('value')->getTask() ?>
<?php echo $form->vars['value']->getTask() ?>

.. index::
single: Forms; Rendering each field by hand
Expand Down Expand Up @@ -890,7 +890,7 @@ to get the ``id``:

.. code-block:: html+php

<?php echo $form['task']->get('id') ?>
<?php echo $form['task']->vars['id']?>

To get the value used for the form field's name attribute you need to use
the ``full_name`` value:
Expand All @@ -903,7 +903,7 @@ the ``full_name`` value:

.. code-block:: html+php

<?php echo $form['task']->get('full_name') ?>
<?php echo $form['task']->vars['full_name'] ?>

Twig Template Function Reference
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1085,7 +1085,7 @@ the choice is ultimately up to you.
The field data can be accessed in a controller with::

$form->get('dueDate')->getData();

In addition, the data of an unmapped field can also be modified directly::

$form->get('dueDate')->setData(new \DateTime());
Expand Down
14 changes: 6 additions & 8 deletions components/http_foundation/trusting_proxies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ your proxy.
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
// only trust proxy headers coming from this IP addresses
$request->setTrustedProxies(array('192.0.0.1', '10.0.0.0/8'));
Request::setTrustedProxies(array('192.0.0.1', '10.0.0.0/8'));
Configuring Header Names
------------------------
Expand All @@ -40,10 +38,10 @@ By default, the following proxy headers are trusted:
If your reverse proxy uses a different header name for any of these, you
can configure that header name via :method:`Symfony\\Component\\HttpFoundation\\Request::setTrustedHeaderName`::

$request->setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X-Proxy-For');
$request->setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X-Proxy-Host');
$request->setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port');
$request->setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X-Proxy-For');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, 'X-Proxy-Host');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto');

Not trusting certain Headers
----------------------------
Expand All @@ -53,4 +51,4 @@ listed above are trusted. If you need to trust some of these headers but
not others, you can do that as well::

// disables trusting the ``X-Forwarded-Proto`` header, the default header is used
$request->setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, '');
Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, '');
2 changes: 1 addition & 1 deletion cookbook/console/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ or the equivalent:

.. code-block:: bash
$ php app/console cache:clear -e=prod
$ php app/console cache:clear -e prod
In addition to changing the environment, you can also choose to disable debug mode.
This can be useful where you want to run commands in the ``dev`` environment
Expand Down
4 changes: 4 additions & 0 deletions reference/forms/types/button.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ A simple, non-responsive button.
| | - `label_attr`_ |
| | - `translation_domain`_ |
+----------------------+----------------------------------------------------------------------+
| Overridden Options | - `auto_initialize` |
+----------------------+----------------------------------------------------------------------+
| Parent type | none |
+----------------------+----------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType` |
Expand All @@ -35,3 +37,5 @@ Options
.. include:: /reference/forms/types/options/label_attr.rst.inc

.. include:: /reference/forms/types/options/button_translation_domain.rst.inc

.. include:: /reference/forms/types/options/button_auto_initialize.rst.inc
9 changes: 9 additions & 0 deletions reference/forms/types/options/button_auto_initialize.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
auto_initialize
~~~~~~~~~~~~~~~

**type**: ``boolean`` **default**: ``false``

An internal option: sets whether the form should be initialized automatically.
For all fields, this option should only be ``true`` for root forms and since
a button can't be an entire form on its own, this is set to ``false``. You
won't need to change this option and probably won't need to worry about it.
2 changes: 1 addition & 1 deletion reference/forms/types/options/mapped.rst.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mapped
~~~~~~

**type**: ``boolean``
**type**: ``boolean`` **default**: ``true``

If you wish the field to be ignored when reading or writing to the object, you
can set the ``mapped`` option to ``false``.

0 comments on commit f08e2a5

Please # to comment.