File tree Expand file tree Collapse file tree 9 files changed +20
-21
lines changed Expand file tree Collapse file tree 9 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ The :class:`Symfony\\Component\\DomCrawler\\Crawler` class provides methods
36
36
to query and manipulate HTML and XML documents.
37
37
38
38
An instance of the Crawler represents a set of :phpclass: `DOMElement ` objects,
39
- which are basically nodes that you can traverse easily ::
39
+ which are basically nodes that you can traverse::
40
40
41
41
use Symfony\Component\DomCrawler\Crawler;
42
42
Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ This is a simplified overview of the request workflow in Symfony applications:
47
47
#. The **browser ** displays the **resource ** to the **user **.
48
48
49
49
Typically, some sort of framework or system is built to handle all the repetitive
50
- tasks (e.g. routing, security, etc) so that a developer can easily build
51
- each * page * of the application. Exactly *how * these systems are built varies
52
- greatly. The HttpKernel component provides an interface that formalizes
53
- the process of starting with a request and creating the appropriate response.
54
- The component is meant to be the heart of any application or framework, no
55
- matter how varied the architecture of that system::
50
+ tasks (e.g. routing, security, etc) so that a developer can build each * page * of
51
+ the application. Exactly *how * these systems are built varies greatly. The HttpKernel
52
+ component provides an interface that formalizes the process of starting with a
53
+ request and creating the appropriate response. The component is meant to be the
54
+ heart of any application or framework, no matter how varied the architecture of
55
+ that system::
56
56
57
57
namespace Symfony\Component\HttpKernel;
58
58
Original file line number Diff line number Diff line change @@ -522,8 +522,8 @@ Options without Default Values
522
522
In some cases, it is useful to define an option without setting a default value.
523
523
This is useful if you need to know whether or not the user *actually * set
524
524
an option or not. For example, if you set the default value for an option,
525
- it's not possible to know whether the user passed this value or if it simply
526
- comes from the default::
525
+ it's not possible to know whether the user passed this value or if it comes
526
+ from the default::
527
527
528
528
// ...
529
529
class Mailer
Original file line number Diff line number Diff line change @@ -286,8 +286,8 @@ Comments can be added in YAML by prefixing them with a hash mark (``#``):
286
286
287
287
.. note ::
288
288
289
- Comments are simply ignored by the YAML parser and do not need to be
290
- indented according to the current level of nesting in a collection.
289
+ Comments are ignored by the YAML parser and do not need to be indented
290
+ according to the current level of nesting in a collection.
291
291
292
292
Explicit Typing
293
293
---------------
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ Next, enable the php engine:
66
66
],
67
67
]);
68
68
69
- You can now render a PHP template instead of a Twig one simply by using the
70
- `` .php `` extension in the template name instead of ``.twig ``. The controller
71
- below renders the ``index.html.php `` template::
69
+ You can now render a PHP template instead of a Twig one by using the `` .php ``
70
+ extension in the template name instead of ``.twig ``. The controller below
71
+ renders the ``index.html.php `` template::
72
72
73
73
// src/Controller/HelloController.php
74
74
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ How to Work with Different Output Formats in Templates
6
6
7
7
Templates are a generic way to render content in *any * format. While in
8
8
most cases you'll use templates to render HTML content, a template can just
9
- as easily generate JavaScript, CSS, XML or any other format you can dream of .
9
+ generate JavaScript, CSS, XML or any other format.
10
10
11
11
For example, the same "resource" is often rendered in several formats.
12
12
To render an article index page in XML, include the format in the
Original file line number Diff line number Diff line change @@ -47,9 +47,8 @@ Notice that this template extends the section template (``blog/layout.html.twig`
47
47
which in turn extends the base application layout (``base.html.twig ``). This is
48
48
the common three-level inheritance model.
49
49
50
- When building your application, you may choose to follow this method or simply
50
+ When building your application, you may choose to follow this method or
51
51
make each page template extend the base application template directly
52
52
(e.g. ``{% extends 'base.html.twig' %} ``). The three-template model is a
53
53
best-practice method used by vendor bundles so that the base template for a
54
- bundle can be easily overridden to properly extend your application's base
55
- layout.
54
+ bundle can be overridden to properly extend your application's base layout.
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ can do this without creating a controller:
54
54
55
55
return $routes;
56
56
57
- The ``TemplateController `` will simply render whatever template you've passed as
58
- the ``template `` default value.
57
+ The ``TemplateController `` will render whatever template you've passed as the
58
+ ``template `` default value.
59
59
60
60
You can also use this trick when rendering embedded controllers
61
61
from within a template. But since the purpose of rendering a controller from
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ Suppose the class you want to test looks like this::
67
67
}
68
68
69
69
Since the ``EntityManagerInterface `` gets injected into the class through the constructor,
70
- it's easy to pass a mock object within a test::
70
+ you can pass a mock object within a test::
71
71
72
72
// tests/Salary/SalaryCalculatorTest.php
73
73
namespace App\Tests\Salary;
You can’t perform that action at this time.
0 commit comments