From 0aad5d36ebd3426a178184eadb65d61beb14dd41 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 9 Jan 2014 18:05:05 +0100 Subject: [PATCH] some language tweaks (AE, third-person perspective) --- book/forms.rst | 6 +++--- book/from_flat_php_to_symfony2.rst | 6 ++---- book/security.rst | 6 +++--- components/console/introduction.rst | 2 +- components/filesystem.rst | 4 ++-- .../http_foundation/session_configuration.rst | 4 ++-- components/routing/introduction.rst | 2 +- components/serializer.rst | 2 +- cookbook/assetic/apply_to_option.rst | 2 +- cookbook/cache/varnish.rst | 2 +- cookbook/configuration/apache_router.rst | 2 +- cookbook/configuration/override_dir_structure.rst | 2 +- cookbook/deployment-tools.rst | 2 +- cookbook/doctrine/dbal.rst | 2 +- cookbook/doctrine/resolve_target_entity.rst | 6 +++--- cookbook/form/create_custom_field_type.rst | 8 ++++---- cookbook/form/create_form_type_extension.rst | 10 +++++----- cookbook/form/dynamic_form_modification.rst | 6 +++--- cookbook/form/form_collections.rst | 7 +++---- cookbook/form/inherit_data_option.rst | 8 ++++---- cookbook/form/unit_testing.rst | 2 +- cookbook/routing/custom_route_loader.rst | 4 ++-- cookbook/security/acl.rst | 4 ++-- cookbook/security/acl_advanced.rst | 2 +- cookbook/security/custom_provider.rst | 2 +- cookbook/service_container/scopes.rst | 12 ++++++------ cookbook/symfony1.rst | 4 ++-- cookbook/templating/PHP.rst | 2 +- cookbook/workflow/new_project_svn.rst | 14 +++++++------- quick_tour/the_big_picture.rst | 2 +- quick_tour/the_view.rst | 2 +- reference/dic_tags.rst | 4 ++-- 32 files changed, 70 insertions(+), 73 deletions(-) diff --git a/book/forms.rst b/book/forms.rst index 4f5dfc2492e..ea58cfd6756 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -281,7 +281,7 @@ Submitting Forms with Multiple Buttons When your form contains more than one submit button, you will want to check which of the buttons was clicked to adapt the program flow in your controller. -Let's add a second button with the caption "Save and add" to our form:: +To do this, add a second button with the caption "Save and add" to your form:: $form = $this->createFormBuilder($task) ->add('task', 'text') @@ -552,8 +552,8 @@ Groups based on the Clicked Button When your form contains multiple submit buttons, you can change the validation group depending on which button is used to submit the form. For example, consider a form in a wizard that lets you advance to the next step or go back -to the previous step. Let's assume also that when returning to the previous -step, the data of the form should be saved, but not validated. +to the previous step. Also assume that when returning to the previous step, +the data of the form should be saved, but not validated. First, we need to add the two buttons to the form:: diff --git a/book/from_flat_php_to_symfony2.rst b/book/from_flat_php_to_symfony2.rst index f593f81b3cc..e65f75436b9 100644 --- a/book/from_flat_php_to_symfony2.rst +++ b/book/from_flat_php_to_symfony2.rst @@ -75,8 +75,6 @@ to maintain. There are several problems that need to be addressed: tied to MySQL. Though not covered here, Symfony2 fully integrates `Doctrine`_, a library dedicated to database abstraction and mapping. -Let's get to work on solving these problems and more. - Isolating the Presentation ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -673,8 +671,8 @@ Where Symfony2 Delivers ~~~~~~~~~~~~~~~~~~~~~~~ In the upcoming chapters, you'll learn more about how each piece of Symfony -works and the recommended organization of a project. For now, let's see how -migrating the blog from flat PHP to Symfony2 has improved life: +works and the recommended organization of a project. For now, have a look +at how migrating the blog from flat PHP to Symfony2 has improved life: * Your application now has **clear and consistently organized code** (though Symfony doesn't force you into this). This promotes **reusability** and diff --git a/book/security.rst b/book/security.rst index 12a50e35e63..b76106633fe 100644 --- a/book/security.rst +++ b/book/security.rst @@ -148,8 +148,8 @@ that looks like the following: * All URLs *not* matching ``/admin/*`` are accessible by all users (and the user is never prompted to log in). -Let's look briefly at how security works and how each part of the configuration -comes into play. +Read this short summary about how security works and how each part of the +configuration comes into play. How Security Works: Authentication and Authorization ---------------------------------------------------- @@ -541,7 +541,7 @@ And that's it! When you submit the form, the security system will automatically check the user's credentials and either authenticate the user or send the user back to the login form where the error can be displayed. -Let's review the whole process: +To review the whole process: #. The user tries to access a resource that is protected; #. The firewall initiates the authentication process by redirecting the diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 0bd13d47098..2462775bc3f 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -27,7 +27,7 @@ You can install the component in 2 different ways: configured with an ANSI driver and your console commands invoke other scripts which emit ANSI color sequences, they will be shown as raw escape characters. - To enable ANSI colour support for Windows, please install `ANSICON`_. + To enable ANSI color support for Windows, please install `ANSICON`_. Creating a basic Command ------------------------ diff --git a/components/filesystem.rst b/components/filesystem.rst index 1860d10bd56..ab92e083d54 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -162,8 +162,8 @@ the mode of a file. The fourth argument is a boolean recursive option:: Remove ~~~~~~ -:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` let's you remove -files, symlink, directories easily:: +:method:`Symfony\\Component\\Filesystem\\Filesystem::remove` is used to remove +files, symlinks, directories easily:: $fs->remove(array('symlink', '/path/to/directory', 'activity.log')); diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index 5f9687e37c1..f5ad863a2cb 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -7,7 +7,7 @@ Configuring Sessions and Save Handlers This section deals with how to configure session management and fine tune it to your specific needs. This documentation covers save handlers, which -store and retrieve session data, and configuring session behaviour. +store and retrieve session data, and configuring session behavior. Save Handlers ~~~~~~~~~~~~~ @@ -57,7 +57,7 @@ Example usage:: Native save handlers provide a quick solution to session storage, however, in complex systems where you need more control, custom save handlers may provide more freedom and flexibility. - Symfony2 provides several implementations which you may further customise as required. + Symfony2 provides several implementations which you may further customize as required. Custom Save Handlers -------------------- diff --git a/components/routing/introduction.rst b/components/routing/introduction.rst index a3ab1b59800..62e9840b451 100644 --- a/components/routing/introduction.rst +++ b/components/routing/introduction.rst @@ -25,7 +25,7 @@ In order to set up a basic routing system you need three parts: * A :class:`Symfony\\Component\\Routing\\RequestContext`, which has information about the request * A :class:`Symfony\\Component\\Routing\\Matcher\\UrlMatcher`, which performs the mapping of the request to a single route -Let's see a quick example. Notice that this assumes that you've already configured +Here is a quick example. Notice that this assumes that you've already configured your autoloader to load the Routing component:: use Symfony\Component\Routing\Matcher\UrlMatcher; diff --git a/components/serializer.rst b/components/serializer.rst index a82a4b5ee66..4064743c076 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -129,7 +129,7 @@ method on the normalizer definition:: Deserializing an Object ----------------------- -Let's see now how to do the exactly the opposite. This time, the information +You'll now learn how to do the exact opposite. This time, the information of the ``Person`` class would be encoded in XML format:: $data = <<`: you have a Media model with a file property (corresponding to the file field in the form) and a path property (corresponding to the image path in the diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst index 81a22206237..5b470c5c041 100644 --- a/cookbook/form/dynamic_form_modification.rst +++ b/cookbook/form/dynamic_form_modification.rst @@ -29,8 +29,8 @@ field. Customizing your Form based on the underlying Data -------------------------------------------------- -Before jumping right into dynamic form generation, let's have a quick review -of what a bare form class looks like:: +Before jumping right into dynamic form generation, hold on and recall what +a bare form class looks like:: // src/Acme/DemoBundle/Form/Type/ProductType.php namespace Acme\DemoBundle\Form\Type; @@ -226,7 +226,7 @@ How to Dynamically Generate Forms based on user Data Sometimes you want a form to be generated dynamically based not only on data from the form but also on something else - like some data from the current user. -Suppose you have a social website where a user can only message people marked +Suppose you have a social website where a user can only message people marked as friends on the website. In this case, a "choice list" of whom to message should only contain users that are the current user's friends. diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 654524b84b8..eed8615aa23 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -20,8 +20,8 @@ that Task, right inside the same form. including the ``ManyToMany`` association mapping definition on the Task's ``tags`` property. -Let's start there: suppose that each ``Task`` belongs to multiple ``Tag`` -objects. Start by creating a simple ``Task`` class:: +First, suppose that each ``Task`` belongs to multiple ``Tag`` objects. Start +by creating a simple ``Task`` class:: // src/Acme/TaskBundle/Entity/Task.php namespace Acme\TaskBundle\Entity; @@ -77,8 +77,7 @@ objects:: The ``name`` property is public here, but it can just as easily be protected or private (but then it would need ``getName`` and ``setName`` methods). -Now let's get to the forms. Create a form class so that a ``Tag`` object -can be modified by the user:: +Then, create a form class so that a ``Tag`` object can be modified by the user:: // src/Acme/TaskBundle/Form/Type/TagType.php namespace Acme\TaskBundle\Form\Type; diff --git a/cookbook/form/inherit_data_option.rst b/cookbook/form/inherit_data_option.rst index 102d391c1f9..92efc82be10 100644 --- a/cookbook/form/inherit_data_option.rst +++ b/cookbook/form/inherit_data_option.rst @@ -44,7 +44,7 @@ entities, a ``Company`` and a ``Customer``:: As you can see, each entity shares a few of the same fields: ``address``, ``zipcode``, ``city``, ``country``. -Let's build two forms for these entities, ``CompanyType`` and ``CustomerType``:: +Start with building two forms for these entities, ``CompanyType`` and ``CustomerType``:: // src/Acme/HelloBundle/Form/Type/CompanyType.php namespace Acme\HelloBundle\Form\Type; @@ -81,8 +81,8 @@ Let's build two forms for these entities, ``CompanyType`` and ``CustomerType``:: } Instead of including the duplicated fields ``address``, ``zipcode``, ``city`` -and ``country`` in both of these forms, we will create a third form for that. -We will call this form simply ``LocationType``:: +and ``country`` in both of these forms, create a third form called ``LocationType`` +for that:: // src/Acme/HelloBundle/Form/Type/LocationType.php namespace Acme\HelloBundle\Form\Type; @@ -127,7 +127,7 @@ access the properties of the ``Customer`` instance instead. Easy, eh? can also (just like with any option) pass it in the third argument of ``$builder->add()``. -Let's make this work by adding the location form to our two original forms:: +Finally, make this work by adding the location form to your two original forms:: // src/Acme/HelloBundle/Form/Type/CompanyType.php public function buildForm(FormBuilderInterface $builder, array $options) diff --git a/cookbook/form/unit_testing.rst b/cookbook/form/unit_testing.rst index 6df1e2f27d6..c36dc84c305 100644 --- a/cookbook/form/unit_testing.rst +++ b/cookbook/form/unit_testing.rst @@ -73,7 +73,7 @@ The simplest ``TypeTestCase`` implementation looks like the following:: } } -So, what does it test? Let's explain it line by line. +So, what does it test? Here comes a detailed explanation. First you verify if the ``FormType`` compiles. This includes basic class inheritance, the ``buildForm`` function and options resolution. This should diff --git a/cookbook/routing/custom_route_loader.rst b/cookbook/routing/custom_route_loader.rst index 27faf708fbf..36694e36727 100644 --- a/cookbook/routing/custom_route_loader.rst +++ b/cookbook/routing/custom_route_loader.rst @@ -202,9 +202,9 @@ Instead, you only need to add a few extra lines to the routing configuration: return $collection; The important part here is the ``type`` key. Its value should be "extra". -This is the type which our ``ExtraLoader`` supports and this will make sure +This is the type which the ``ExtraLoader`` supports and this will make sure its ``load()`` method gets called. The ``resource`` key is insignificant -for the ``ExtraLoader``, so we set it to ".". +for the ``ExtraLoader``, so it is set to ".". .. note:: diff --git a/cookbook/security/acl.rst b/cookbook/security/acl.rst index 71cd6537ad4..bb3f20a299e 100644 --- a/cookbook/security/acl.rst +++ b/cookbook/security/acl.rst @@ -87,8 +87,8 @@ Fortunately, there is a task for this. Simply run the following command: Getting Started --------------- -Coming back to the small example from the beginning, let's implement ACL for -it. +Coming back to the small example from the beginning, you can now implement +ACL for it. Creating an ACL, and adding an ACE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cookbook/security/acl_advanced.rst b/cookbook/security/acl_advanced.rst index 1bc217d8e6e..8a902004b3d 100644 --- a/cookbook/security/acl_advanced.rst +++ b/cookbook/security/acl_advanced.rst @@ -77,7 +77,7 @@ Symfony2, there are basically two different scopes: it only applies to one specific object. Sometimes, you will find the need to apply an ACE only to a specific field of -the object. Let's say you want the ID only to be viewable by an administrator, +the object. Suppose you want the ID only to be viewable by an administrator, but not by your customer service. To solve this common problem, two more sub-scopes have been added: diff --git a/cookbook/security/custom_provider.rst b/cookbook/security/custom_provider.rst index 3d52a4e01f2..1833a78e791 100644 --- a/cookbook/security/custom_provider.rst +++ b/cookbook/security/custom_provider.rst @@ -33,7 +33,7 @@ which defines a method to check if the user is equal to the current user. This interface requires an :method:`Symfony\\Component\\Security\\Core\\User\\EquatableInterface::isEqualTo` method. -Let's see this in action:: +This is how your ``WebserviceUser`` class looks in action:: // src/Acme/WebserviceUserBundle/Security/User/WebserviceUser.php namespace Acme\WebserviceUserBundle\Security\User; diff --git a/cookbook/service_container/scopes.rst b/cookbook/service_container/scopes.rst index 1780195e3c0..196415534d3 100644 --- a/cookbook/service_container/scopes.rst +++ b/cookbook/service_container/scopes.rst @@ -1,7 +1,7 @@ .. index:: single: DependencyInjection; Scopes -How to work with Scopes +How to Work with Scopes ======================= This entry is all about scopes, a somewhat advanced topic related to the @@ -42,12 +42,12 @@ when compiling the container. Read the sidebar below for more details. Imagine, however, that you need the ``request`` service in your ``my_mailer`` service, maybe because you're reading the URL of the current request. - So, you add it as a constructor argument. Let's look at why this presents - a problem: + So, you add it as a constructor argument. There are several reasons why + this presents a problem: - * When requesting ``my_mailer``, an instance of ``my_mailer`` (let's call - it *MailerA*) is created and the ``request`` service (let's call it - *RequestA*) is passed to it. Life is good! + * When requesting ``my_mailer``, an instance of ``my_mailer`` (called + *MailerA*) is created and the ``request`` service (called *RequestA*) + is passed to it. Life is good! * You've now made a subrequest in Symfony, which is a fancy way of saying that you've called, for example, the ``{{ render(...) }}`` Twig function, diff --git a/cookbook/symfony1.rst b/cookbook/symfony1.rst index 5db7fb7d9db..64778e3a6c8 100644 --- a/cookbook/symfony1.rst +++ b/cookbook/symfony1.rst @@ -50,8 +50,8 @@ directory is a bit like the ``plugins`` directory in symfony1, but much more flexible. Additionally, while *your* bundles will live in the ``src/`` directory, third-party bundles will live somewhere in the ``vendor/`` directory. -To get a better picture of the ``src/`` directory, let's first think of a -symfony1 application. First, part of your code likely lives inside one or +To get a better picture of the ``src/`` directory, first think of the structure +of a symfony1 application. First, part of your code likely lives inside one or more applications. Most commonly these include modules, but could also include any other PHP classes you put in your application. You may have also created a ``schema.yml`` file in the ``config`` directory of your project and built diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index bd3dba7ff26..7283c409653 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -100,7 +100,7 @@ is the same notation used to reference a template. The ``::`` part simply means that the controller element is empty, so the corresponding file is directly stored under ``views/``. -Now, let's have a look at the ``layout.html.php`` file: +Now, have a look at the ``layout.html.php`` file: .. code-block:: html+php diff --git a/cookbook/workflow/new_project_svn.rst b/cookbook/workflow/new_project_svn.rst index 2466edb2528..feb4e399ee9 100644 --- a/cookbook/workflow/new_project_svn.rst +++ b/cookbook/workflow/new_project_svn.rst @@ -52,8 +52,8 @@ To get started, you'll need to download Symfony2 and get the basic Subversion se your new project structure, config files, etc. Rename it to whatever you like. -3. Checkout the Subversion repository that will host this project. Let's say it - is hosted on `Google code`_ and called ``myproject``: +3. Checkout the Subversion repository that will host this project. Suppose + it is hosted on `Google code`_ and called ``myproject``: .. code-block:: bash @@ -65,11 +65,11 @@ To get started, you'll need to download Symfony2 and get the basic Subversion se $ mv Symfony/* myproject/ -5. Let's now set the ignore rules. Not everything *should* be stored in your - Subversion repository. Some files (like the cache) are generated and - others (like the database configuration) are meant to be customized - on each machine. This makes use of the ``svn:ignore`` property, so that - specific files can be ignored. +5. Now, set the ignore rules. Not everything *should* be stored in your Subversion + repository. Some files (like the cache) are generated and others (like + the database configuration) are meant to be customized on each machine. + This makes use of the ``svn:ignore`` property, so that specific files can + be ignored. .. code-block:: bash diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 290767552b3..5ac004a1e26 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -156,7 +156,7 @@ Symfony2 (replace *Fabien* with your first name): .. image:: /images/quick_tour/hello_fabien.png :align: center -What's going on here? Let's dissect the URL: +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 point of the application and it responds to all user requests; diff --git a/quick_tour/the_view.rst b/quick_tour/the_view.rst index bf8e8d4210b..78f856e47a9 100644 --- a/quick_tour/the_view.rst +++ b/quick_tour/the_view.rst @@ -122,7 +122,7 @@ It is the same notation used to reference a regular template. The ``::`` part simply means that the controller element is empty, so the corresponding file is directly stored under the ``Resources/views/`` directory. -Now, let's have a look at a simplified ``layout.html.twig``: +Now, simplify the ``layout.html.twig`` template: .. code-block:: jinja diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index 05d600afaa7..94fc8bac3f2 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -667,8 +667,8 @@ extra data in the records. A processor receives the record as an argument and must return it after adding some extra data in the ``extra`` attribute of the record. -Let's see how you can use the built-in ``IntrospectionProcessor`` to add -the file, the line, the class and the method where the logger was triggered. +The built-in ``IntrospectionProcessor`` can be used to add the file, the line, +the class and the method where the logger was triggered. You can add a processor globally: