8000 Merge branch '3.0' · symfony/symfony-docs@16763f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 16763f8

Browse files
committed
Merge branch '3.0'
2 parents fd255e9 + 3b1f19e commit 16763f8

File tree

7 files changed

+29
-8
lines changed

7 files changed

+29
-8
lines changed

book/service_container.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ which you can access inside a standard controller as follows::
982982

983983
In Symfony, you'll constantly use services provided by the Symfony core or
984984
other third-party bundles to perform tasks such as rendering templates (``templating``),
985-
sending emails (``mailer``), or accessing information on the request (``request``).
985+
sending emails (``mailer``), or accessing information on the request through the request stack (``request_stack``).
986986

987987
You can take this a step further by using these services inside services that
988988
you've created for your application. Beginning by modifying the ``NewsletterManager``

components/security/authorization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ on a "remember-me" cookie, or even authenticated anonymously?
120120
// any object
121121
$object = ...;
122122
123-
$vote = $authenticatedVoter->vote($token, $object, array('IS_AUTHENTICATED_FULLY');
123+
$vote = $authenticatedVoter->vote($token, $object, array('IS_AUTHENTICATED_FULLY'));
124124
125125
RoleVoter
126126
~~~~~~~~~

cookbook/assetic/php.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ directory and execute the following commands:
3333
.. code-block:: bash
3434
3535
$ composer require leafo/scssphp
36-
$ composer require patchwork/jsqueeze:"~1.0"
36+
$ composer require patchwork/jsqueeze
3737
38-
It's very important to maintain the ``~1.0`` version constraint for the ``jsqueeze``
39-
dependency because the most recent stable version is not compatible with Assetic.
4038
4139
Organizing your Web Asset Files
4240
-------------------------------

cookbook/bundles/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ For the configuration example in the previous section, the array passed to your
139139
array(
140140
'twitter' => array(
141141
'client_id' => 123,
142-
'client_secret' => '$secret',
142+
'client_secret' => 'your_secret',
143143
),
144144
),
145145
)
@@ -155,7 +155,7 @@ beneath it, the incoming array might look like this::
155155
array(
156156
'twitter' => array(
157157
'client_id' => 123,
158-
'client_secret' => '$secret',
158+
'client_secret' => 'your_secret',
159159
),
160160
),
161161
// values from config_dev.yml

cookbook/workflow/homestead.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ quickly.
1111
.. tip::
1212

1313
Due to the amount of filesystem operations in Symfony (e.g. updating cache
14-
files and writing to log files), Symfony can slow down signifcantly. To
14+
files and writing to log files), Symfony can slow down significantly. To
1515
improve the speed, consider :ref:`overriding the cache and log directories <override-cache-dir>`
1616
to a location outside the NFS share (for instance, by using
1717
:phpfunction:`sys_get_temp_dir`). You can read `this blog post`_ for more

images/request-flow.png

-5.13 KB
Loading

reference/forms/types/collection.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ photos).
2020
| | - `entry_options`_ |
2121
| | - `entry_type`_ |
2222
| | - `prototype`_ |
23+
| | - `prototype_data`_ |
2324
| | - `prototype_name`_ |
2425
+-------------+-----------------------------------------------------------------------------+
2526
| Inherited | - `by_reference`_ |
@@ -353,6 +354,28 @@ rendering your form, having the entire "form row" may be easier for you.
353354
For details on how to actually use this option, see the above example as
354355
well as :ref:`cookbook-form-collections-new-prototype`.
355356

357+
prototype_data
358+
~~~~~~~~~~~~~~
359+
360+
**type**: ``mixed`` **default**: ``null``
361+
362+
Allows you to define specific data for the prototype. Each new row added will
363+
initially contain the data set by this option. By default, the data configured
364+
for all entries with the ``entry_options`` option will be used.
365+
366+
.. code-block:: php
367+
368+
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
369+
use Symfony\Component\Form\Extension\Core\Type\TextType;
370+
// ...
371+
372+
$builder->add('tags', CollectionType::class, array(
373+
'entry_type' => TextType::class,
374+
'allow_add' => true,
375+
'prototype' => true,
376+
'prototype_data' => 'New Tag Placeholder',
377+
));
378+
356379
prototype_name
357380
~~~~~~~~~~~~~~
358381

0 commit comments

Comments
 (0)
0