Skip to content
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

Fix typo #6500

Closed
wants to merge 19 commits into from
Closed
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
2 changes: 1 addition & 1 deletion book/from_flat_php_to_symfony2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ is primarily an HTML file that uses a template-like PHP syntax:
<ul>
<?php foreach ($posts as $post): ?>
<li>
<a href="/read?id=<?php echo $post['id'] ?>">
<a href="/show.php?id=<?php echo $post['id'] ?>">
<?php echo $post['title'] ?>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ which you can access inside a standard controller as follows::

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

You can take this a step further by using these services inside services that
you've created for your application. Beginning by modifying the ``NewsletterManager``
Expand Down
2 changes: 1 addition & 1 deletion components/security/authorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ on a "remember-me" cookie, or even authenticated anonymously?
// any object
$object = ...;

$vote = $authenticatedVoter->vote($token, $object, array('IS_AUTHENTICATED_FULLY');
$vote = $authenticatedVoter->vote($token, $object, array('IS_AUTHENTICATED_FULLY'));

RoleVoter
~~~~~~~~~
Expand Down
4 changes: 1 addition & 3 deletions cookbook/assetic/php.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ directory and execute the following commands:
.. code-block:: bash

$ composer require leafo/scssphp
$ composer require patchwork/jsqueeze:"~1.0"
$ composer require patchwork/jsqueeze

It's very important to maintain the ``~1.0`` version constraint for the ``jsqueeze``
dependency because the most recent stable version is not compatible with Assetic.

Organizing your Web Asset Files
-------------------------------
Expand Down
4 changes: 2 additions & 2 deletions cookbook/bundles/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ For the configuration example in the previous section, the array passed to your
array(
'twitter' => array(
'client_id' => 123,
'client_secret' => '$secret',
'client_secret' => 'your_secret',
),
),
)
Expand All @@ -155,7 +155,7 @@ beneath it, the incoming array might look like this::
array(
'twitter' => array(
'client_id' => 123,
'client_secret' => '$secret',
'client_secret' => 'your_secret',
),
),
// values from config_dev.yml
Expand Down
2 changes: 1 addition & 1 deletion cookbook/workflow/homestead.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ quickly.
.. tip::

Due to the amount of filesystem operations in Symfony (e.g. updating cache
files and writing to log files), Symfony can slow down signifcantly. To
files and writing to log files), Symfony can slow down significantly. To
improve the speed, consider :ref:`overriding the cache and log directories <override-cache-dir>`
to a location outside the NFS share (for instance, by using
:phpfunction:`sys_get_temp_dir`). You can read `this blog post`_ for more
Expand Down
Binary file modified images/request-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions reference/forms/types/collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ photos).
| | - `entry_options`_ |
| | - `entry_type`_ |
| | - `prototype`_ |
| | - `prototype_data`_ |
| | - `prototype_name`_ |
+-------------+-----------------------------------------------------------------------------+
| Inherited | - `by_reference`_ |
Expand Down Expand Up @@ -353,6 +354,31 @@ rendering your form, having the entire "form row" may be easier for you.
For details on how to actually use this option, see the above example as
well as :ref:`cookbook-form-collections-new-prototype`.

prototype_data
~~~~~~~~~~~~~~

.. versionadded:: 2.8
The ``prototype_data`` option was introduced in Symfony 2.8.

**type**: ``mixed`` **default**: ``null``

Allows you to define specific data for the prototype. Each new row added will
initially contain the data set by this option. By default, the data configured
for all entries with the `entry_options`_ option will be used.

.. code-block:: php

use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
// ...

$builder->add('tags', CollectionType::class, array(
'entry_type' => TextType::class,
'allow_add' => true,
'prototype' => true,
'prototype_data' => 'New Tag Placeholder',
));

prototype_name
~~~~~~~~~~~~~~

Expand Down