Skip to content

Commit 9f7f31b

Browse files
committed
Merge branch '2.0' into 2.1
Conflicts: cookbook/form/dynamic_form_generation.rst
2 parents 63e2b3f + 3bb5d61 commit 9f7f31b

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

cookbook/doctrine/dbal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The SchemaTool is used to inspect the database to compare the schema. To
133133
achieve this task, it needs to know which mapping type needs to be used
134134
for each database types. Registering new ones can be done through the configuration.
135135

136-
Let's map the ENUM type (not suppoorted by DBAL by default) to a the ``string``
136+
Let's map the ENUM type (not supported by DBAL by default) to a the ``string``
137137
mapping type:
138138

139139
.. configuration-block::

cookbook/event_dispatcher/before_after_filters.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ How to setup before and after Filters
55
=====================================
66

77
It is quite common in web application development to need some logic to be
8-
executed just before or just after your controller actions acting as filters
8+
executed just before or just after your controller actions acting as filters
99
or hooks.
1010

1111
In symfony1, this was achieved with the preExecute and postExecute methods.
@@ -180,7 +180,7 @@ your listener to be called just before any controller is executed.
180180
With this configuration, your ``TokenListener`` ``onKernelController`` method
181181
will be executed on each request. If the controller that is about to be executed
182182
implements ``TokenAuthenticatedController``, token authentication is
183-
applied. This let's us have a "before" filter on any controller that you
183+
applied. This lets us have a "before" filter on any controller that you
184184
want.
185185

186186
After filters with the ``kernel.response`` Event
@@ -277,4 +277,4 @@ executed (``onKernelController``) and after every controller returns a response
277277
(``onKernelResponse``). By making specific controllers implement the ``TokenAuthenticatedController``
278278
interface, our listener knows which controllers it should take action on.
279279
And by storing a value in the request's "attributes" bag, the ``onKernelResponse``
280-
method knows to add the extra header. Have fun!
280+
method knows to add the extra header. Have fun!

cookbook/form/dynamic_form_generation.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
How to Dynamically Generate Forms Using Form Events
55
===================================================
66

7-
Before jumping right into dynamic form generation, let's have a quick review
7+
Before jumping right into dynamic form generation, let's have a quick review
88
of what a bare form class looks like::
99

1010
// src/Acme/DemoBundle/Form/Type/ProductType.php
1111
namespace Acme\DemoBundle\Form\Type;
1212

1313
use Symfony\Component\Form\AbstractType;
1414
use Symfony\Component\Form\FormBuilderInterface;
15-
15+
1616
class ProductType extends AbstractType
1717
{
1818
public function buildForm(FormBuilderInterface $builder, array $options)
@@ -29,28 +29,28 @@ of what a bare form class looks like::
2929

3030
.. note::
3131

32-
If this particular section of code isn't already familiar to you, you
33-
probably need to take a step back and first review the :doc:`Forms chapter </book/forms>`
32+
If this particular section of code isn't already familiar to you, you
33+
probably need to take a step back and first review the :doc:`Forms chapter </book/forms>`
3434
before proceeding.
3535

3636
Let's assume for a moment that this form utilizes an imaginary "Product" class
37-
that has only two relevant properties ("name" and "price"). The form generated
37+
that has only two relevant properties ("name" and "price"). The form generated
3838
from this class will look the exact same regardless of a new Product is being created
3939
or if an existing product is being edited (e.g. a product fetched from the database).
4040

41-
Suppose now, that you don't want the user to be able to change the ``name`` value
41+
Suppose now, that you don't want the user to be able to change the ``name`` value
4242
once the object has been created. To do this, you can rely on Symfony's :doc:`Event Dispatcher </components/event_dispatcher/introduction>`
43-
system to analyze the data on the object and modify the form based on the
44-
Product object's data. In this entry, you'll learn how to add this level of
43+
system to analyze the data on the object and modify the form based on the
44+
Product object's data. In this entry, you'll learn how to add this level of
4545
flexibility to your forms.
4646

4747
.. _`cookbook-forms-event-subscriber`:
4848

4949
Adding An Event Subscriber To A Form Class
5050
------------------------------------------
5151

52-
So, instead of directly adding that "name" widget via our ProductType form
53-
class, let's delegate the responsibility of creating that particular field
52+
So, instead of directly adding that "name" widget via our ProductType form
53+
class, let's delegate the responsibility of creating that particular field
5454
to an Event Subscriber::
5555

5656
// src/Acme/DemoBundle/Form/Type/ProductType.php
@@ -75,8 +75,8 @@ to an Event Subscriber::
7575
}
7676
}
7777

78-
The event subscriber is passed the FormFactory object in its constructor so
79-
that our new subscriber is capable of creating the form widget once it is
78+
The event subscriber is passed the FormFactory object in its constructor so
79+
that our new subscriber is capable of creating the form widget once it is
8080
notified of the dispatched event during form creation.
8181

8282
.. _`cookbook-forms-inside-subscriber-class`:
@@ -119,8 +119,8 @@ might look like the following::
119119

120120
// During form creation setData() is called with null as an argument
121121
// by the FormBuilder constructor. We're only concerned with when
122-
// setData is called with an actual Entity object in it (whether new,
123-
// or fetched with Doctrine). This if statement let's us skip right
122+
// setData is called with an actual Entity object in it (whether new
123+
// or fetched with Doctrine). This if statement lets us skip right
124124
// over the null condition.
125125
if (null === $data) {
126126
return;
@@ -135,27 +135,27 @@ might look like the following::
135135

136136
.. caution::
137137

138-
It is easy to misunderstand the purpose of the ``if (null === $data)`` segment
139-
of this event subscriber. To fully understand its role, you might consider
140-
also taking a look at the `Form class`_ and paying special attention to
141-
where setData() is called at the end of the constructor, as well as the
138+
It is easy to misunderstand the purpose of the ``if (null === $data)`` segment
139+
of this event subscriber. To fully understand its role, you might consider
140+
also taking a look at the `Form class`_ and paying special attention to
141+
where setData() is called at the end of the constructor, as well as the
142142
setData() method itself.
143143

144-
The ``FormEvents::PRE_SET_DATA`` line actually resolves to the string ``form.pre_set_data``.
144+
The ``FormEvents::PRE_SET_DATA`` line actually resolves to the string ``form.pre_set_data``.
145145
The `FormEvents class`_ serves an organizational purpose. It is a centralized location
146146
in which you can find all of the various form events available.
147147

148-
While this example could have used the ``form.set_data`` event or even the ``form.post_set_data``
149-
events just as effectively, by using ``form.pre_set_data`` we guarantee that
150-
the data being retrieved from the ``Event`` object has in no way been modified
151-
by any other subscribers or listeners. This is because ``form.pre_set_data``
152-
passes a `DataEvent`_ object instead of the `FilterDataEvent`_ object passed
153-
by the ``form.set_data`` event. `DataEvent`_, unlike its child `FilterDataEvent`_,
148+
While this example could have used the ``form.set_data`` event or even the ``form.post_set_data``
149+
events just as effectively, by using ``form.pre_set_data`` we guarantee that
150+
the data being retrieved from the ``Event`` object has in no way been modified
151+
by any other subscribers or listeners. This is because ``form.pre_set_data``
152+
passes a `DataEvent`_ object instead of the `FilterDataEvent`_ object passed
153+
by the ``form.set_data`` event. `DataEvent`_, unlike its child `FilterDataEvent`_,
154154
lacks a setData() method.
155155

156156
.. note::
157157

158-
You may view the full list of form events via the `FormEvents class`_,
158+
You may view the full list of form events via the `FormEvents class`_,
159159
found in the form bundle.
160160

161161
.. _`DataEvent`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Event/DataEvent.php

cookbook/security/acl_advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Object Identities
3434
The ACL system is completely decoupled from your domain objects. They don't
3535
even have to be stored in the same database, or on the same server. In order
3636
to achieve this decoupling, in the ACL system your objects are represented
37-
through object identity objects. Everytime you want to retrieve the ACL for a
37+
through object identity objects. Every time you want to retrieve the ACL for a
3838
domain object, the ACL system will first create an object identity from your
3939
domain object, and then pass this object identity to the ACL provider for
4040
further processing.

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ would be ``/images/logo.png?version=5``.
216216
.. note::
217217

218218
All percentage signs (``%``) in the format string must be doubled to escape
219-
the character. Without escaping, values might inadvertently be interpretted
219+
the character. Without escaping, values might inadvertently be interpreted
220220
as :ref:`book-service-container-parameters`.
221221

222222
.. tip::

0 commit comments

Comments
 (0)