Skip to content

Commit

Permalink
Merge branch '2.4' into 2.5
Browse files Browse the repository at this point in the history
* 2.4:
  Updated styling of my edit
  Update inherit_data_option.rst
  Fixed typo on tag service
  Fixed typo in filesystem component
  Fixed typo in the yml validation
  usage of a non-default entity manager in an entity user provider
  Added the missing title for a reference
  Fixed (again) a minor typo: Toolbet --> Toolbelt
  Reworded bundle requirement
  Minor rewording and fixed one reference
  Fixed a wrong documentation reference (thanks @wouterj)
  Added a note about permissions in the Quick Tour
  fix parent form types
  • Loading branch information
weaverryan committed Aug 4, 2014
2 parents 61434a8 + 8ead0b7 commit b8481d8
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 13 deletions.
9 changes: 5 additions & 4 deletions book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1125,11 +1125,12 @@ easy to use in your application.
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd>
<service id="acme_demo.form.type.task"
<services>
<service id="acme_demo.form.type.task"
class="Acme\TaskBundle\Form\Type\TaskType">
<tag name="form.type" alias="task" />
</service>
<tag name="form.type" alias="task" />
</service>
</services>
</container>
.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ the relative path of a directory given another one::
'/var/lib/symfony/src/Symfony/',
'/var/lib/symfony/src/Symfony/Component'
);
// returns 'videos'
// returns 'videos/'
$fs->makePathRelative('/tmp/videos', '/tmp')

mirror
Expand Down
6 changes: 3 additions & 3 deletions cookbook/deployment/heroku.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Setting up
----------

To setup a new Heroku website, first `signup with Heroku`_ or sign in
with your credentials. Then download and install the `Heroku Toolbet`_ on your
with your credentials. Then download and install the `Heroku Toolbelt`_ on your
local computer.

You can also check out the `getting Started with PHP on Heroku`_ guide to gain
Expand Down Expand Up @@ -188,8 +188,8 @@ You should be seeing your Symfony2 application in your browser.

.. _`the original article`: https://devcenter.heroku.com/articles/getting-started-with-symfony2
.. _`signup with Heroku`: https://signup.heroku.com/signup/dc
.. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup
.. _`getting Started with PHP on Heroku`: .. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php
.. _`Heroku Toolbelt`: https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup
.. _`getting Started with PHP on Heroku`: https://devcenter.heroku.com/articles/getting-started-with-php
.. _`ephemeral file system`: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
.. _`Logplex`: https://devcenter.heroku.com/articles/logplex
.. _`verified that the RSA key fingerprint is correct`: https://devcenter.heroku.com/articles/git-repository-ssh-fingerprints
4 changes: 4 additions & 0 deletions cookbook/form/inherit_data_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,7 @@ Finally, make this work by adding the location form to your two original forms::
That's it! You have extracted duplicated field definitions to a separate
location form that you can reuse wherever you need it.

.. caution::

Forms with the ``inherit_data`` option set cannot have ``*_SET_DATA`` event listeners.
73 changes: 71 additions & 2 deletions cookbook/security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ Finally, the tutorial will demonstrate how to create a custom
:class:`Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider` object to
retrieve users from a database with custom conditions.

This tutorial assumes there is a bootstrapped and loaded
``Acme\UserBundle`` bundle in the application kernel.
.. sidebar:: Code along with the Example

If you want to follow along with the example in this chapter, create
an AcmeUserBundle via:

.. code-block:: bash
$ php app/console generate:bundle --namespace=Acme/UserBundle
The Data Model
--------------
Expand Down Expand Up @@ -358,6 +364,69 @@ entity user provider to load User entity objects from the database by using
the ``username`` unique field. In other words, this tells Symfony how to
fetch the user from the database before checking the password validity.

.. note::

By default, the entity provider uses the default entity manager to fetch
user information from the database. If you,
:doc:`use multiple entity managers </cookbook/doctrine/multiple_entity_managers>`,
you can specify which manager to use with the ``manager_name`` option:

.. configuration-block::

.. code-block:: yaml
# app/config/config.yml
security:
# ...
providers:
administrators:
entity:
class: AcmeUserBundle:User
property: username
manager_name: customer
# ...
.. code-block:: xml
<!-- app/config/config.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<srv:container xmlns="http://symfony.com/schema/dic/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:srv="http://symfony.com/schema/dic/services"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd">
<config>
<!-- ... -->
<provider name="administrators">
<entity class="AcmeUserBundle:User"
property="username"
manager-name="customer" />
</provider>
<!-- ... -->
</config>
</srv:container>
.. code-block:: php
// app/config/config.php
$container->loadFromExtension('security', array(
// ...
'providers' => array(
'administrator' => array(
'entity' => array(
'class' => 'AcmeUserBundle:User',
'property' => 'username',
'manager_name' => 'customer',
),
),
),
// ...
));
Forbid inactive Users
---------------------

Expand Down
8 changes: 8 additions & 0 deletions quick_tour/the_big_picture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace
.. image:: /images/quick_tour/hello_fabien.png
:align: center

.. note::

Instead of the greeting page, you may see a blank page or an error page.
This is caused by a directory permission misconfiguration. There are several
possible solutions depending on your operating system. All of them are
explained in the :ref:`Setting up Permissions <book-installation-permissions>`
section of the official book.

What's going on here? Have a look at each part of the URL:

* ``app_dev.php``: This is a :term:`front controller`. It is the unique entry
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Valid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ property.
.. code-block:: yaml
# src/Acme/HelloBundle/Resources/config/validation.yml
Acme\HelloBundle\Author:
Acme\HelloBundle\Entity\Author:
properties:
address:
- Valid: ~
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The ``email`` field is a text field that is rendered using the HTML5
| | - `error_mapping`_ |
| | - `mapped`_ |
+-------------+---------------------------------------------------------------------+
| Parent type | :doc:`form </reference/forms/types/form>` |
| Parent type | :doc:`text </reference/forms/types/text>` |
+-------------+---------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\EmailType` |
+-------------+---------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/textarea.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Renders a ``textarea`` HTML element.
| | - `error_mapping`_ |
| | - `mapped`_ |
+-------------+------------------------------------------------------------------------+
| Parent type | :doc:`form </reference/forms/types/form>` |
| Parent type | :doc:`text </reference/forms/types/text>` |
+-------------+------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType` |
+-------------+------------------------------------------------------------------------+
Expand Down

0 comments on commit b8481d8

Please sign in to comment.