8000 Changed to definition lists · symfony/symfony-docs@dda1905 · GitHub
[go: up one dir, main page]

Skip to content

Commit dda1905

Browse files
Changed to definition lists
1 parent 3649bdb commit dda1905

File tree

8 files changed

+140
-112
lines changed

8 files changed

+140
-112
lines changed

book/page_creation.rst

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,17 @@ you'll know where to find and put different types of files and why.
488488
Though entirely flexible, by default, each Symfony :term:`application` has
489489
the same basic and recommended directory structure:
490490

491-
* ``app/``: This directory contains the application configuration;
491+
``app/``
492+
This directory contains the application configuration.
492493

493-
* ``src/``: All the project PHP code is stored under this directory;
494+
``src/``
495+
All the project PHP code is stored under this directory.
494496

495-
* ``vendor/``: Any vendor libraries are placed here by convention;
497+
``vendor/``
498+
Any vendor libraries are placed here by convention.
496499

497-
* ``web/``: This is the web root directory and contains any publicly accessible files;
500+
``web/``
501+
This is the web root directory and contains any publicly accessible files.
498502

499503
.. _the-web-directory:
500504

@@ -554,11 +558,13 @@ needs to know about your application. You don't even need to worry about
554558
these methods when starting - Symfony fills them in for you with sensible
555559
defaults.
556560

557-
* ``registerBundles()``: Returns an array of all bundles needed to run the
558-
application (see :ref:`page-creation-bundles`);
561+
``registerBundles()``
562+
Returns an array of all bundles needed to run the application (see
563+
:ref:`page-creation-bundles`).
559564

560-
* ``registerContainerConfiguration()``: Loads the main application configuration
561-
resource file (see the `Application Configuration`_ section).
565+
``registerContainerConfiguration()``
566+
Loads the main application configuration resource file (see the
567+
`Application Configuration`_ section).
562568

563569
In day-to-day development, you'll mostly use the ``app/`` directory to modify
564570
configuration and routing files in the ``app/config/`` directory (see
@@ -743,23 +749,27 @@ bundle system follows a set of conventions that help to keep code consistent
743749
between all Symfony bundles. Take a look at ``AcmeDemoBundle``, as it contains
744750
some of the most common elements of a bundle:
745751

746-
* ``Controller/`` contains the controllers of the bundle (e.g. ``RandomController.php``);
752+
``Controller/``
753+
Contains the controllers of the bundle (e.g. ``RandomController.php``).
747754

748-
* ``DependencyInjection/`` holds certain dependency injection extension classes,
749-
which may import service configuration, register compiler passes or more
750-
(this directory is not necessary);
755+
``DependencyInjection/``
756+
Holds certain dependency injection extension classes, which may import service
757+
configuration, register compiler passes or more (this directory is not
758+
necessary).
751759

752-
* ``Resources/config/`` houses configuration, including routing configuration
753-
(e.g. ``routing.yml``);
760+
``Resources/config/``
761+
Houses configuration, including routing configuration (e.g. ``routing.yml``).
754762

755-
* ``Resources/views/`` holds templates organized by controller name (e.g.
756-
``Hello/index.html.twig``);
763+
``Resources/views/``
764+
Holds templates organized by controller name (e.g. ``Hello/index.html.twig``).
757765

758-
* ``Resources/public/`` contains web assets (images, stylesheets, etc) and is
759-
copied or symbolically linked into the project ``web/`` directory via
760-
the ``assets:install`` console command;
766+
``Resources/public/``
767+
Contains web assets (images, stylesheets, etc) and is copied or symbolically
768+
linked into the project ``web/`` directory via the ``assets:install`` console
769+
command.
761770

762-
* ``Tests/`` holds all tests for the bundle.
771+
``Tests/``
772+
Holds all tests for the bundle.
763773

764774
A bundle can be as small or large as the feature it implements. It contains
765775
only the files you need and nothing else.

book/propel.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,22 @@ To add a hook, just add a new method to the object class::
467467

468468
Propel provides the following hooks:
469469

470-
* ``preInsert()`` code executed before insertion of a new object
471-
* ``postInsert()`` code executed after insertion of a new object
472-
* ``preUpdate()`` code executed before update of an existing object
473-
* ``postUpdate()`` code executed after update of an existing object
474-
* ``preSave()`` code executed before saving an object (new or existing)
475-
* ``postSave()`` code executed after saving an object (new or existing)
476-
* ``preDelete()`` code executed before deleting an object
477-
* ``postDelete()`` code executed after deleting an object
470+
``preInsert()``
471+
Code executed before insertion of a new object.
472+
``postInsert()``
473+
Code executed after insertion of a new object.
474+
``preUpdate()``
475+
Code executed before update of an existing object.
476+
``postUpdate()``
477+
Code executed after update of an existing object.
478+
``preSave()``
479+
Code executed before saving an object (new or existing).
480+
``postSave()``
481+
Code executed after saving an object (new or existing).
482+
``preDelete()``
483+
Code executed before deleting an object.
484+
``postDelete()``
485+
Code executed after deleting an object.
478486

479487
Behaviors
480488
---------

book/routing.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,12 +1036,15 @@ As you've seen, each routing parameter or default value is eventually available
10361036
as an argument in the controller method. Additionally, there are three parameters
10371037
that are special: each adds a unique piece of functionality inside your application:
10381038

1039-
* ``_controller``: As you've seen, this parameter is used to determine which
1040-
controller is executed when the route is matched;
1039+
``_controller``
1040+
As you've seen, this parameter is used to determine which controller is
1041+
executed when the route is matched.
10411042

1042-
* ``_format``: Used to set the request format (:ref:`read more <book-routing-format-param>`);
1043+
``_format``
1044+
Used to set the request format (:ref:`read more <book-routing-format-param>`).
10431045

1044-
* ``_locale``: Used to set the locale on the request (:ref:`read more <book-translation-locale-url>`).
1046+
``_locale``
1047+
Used to set the locale on the request (:ref:`read more <book-translation-locale-url>`).
10451048

10461049
.. index::
10471050
single: Routing; Controllers

book/templating.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,18 @@ to web designers and, in several ways, more powerful than PHP templates:
7777

7878
Twig defines three types of special syntax:
7979

80-
* ``{{ ... }}``: "Says something": prints a variable or the result of an
81-
expression to the template;
82-
83-
* ``{% ... %}``: "Does something": a **tag** that controls the logic of the
84-
template; it is used to execute statements such as for-loops for example.
85-
86-
* ``{# ... #}``: "Comment something": it's the equivalent of the PHP
87-
``/* comment */`` syntax. It's used to add single or multi-line comments.
88-
The content of the comments isn't included in the rendered pages.
80+
``{{ ... }}``
81+
"Says something": prints a variable or the result of an expression to the
82+
template.
83+
84+
``{% ... %}``
85+
"Does something": a **tag** that controls the logic of the template; it is
86+
used to execute statements such as for-loops for example.
87+
88+
``{# ... #}``
89+
"Comment something": it's the equivalent of the PHP ``/* comment */`` syntax.
90+
It's used to add single or multi-line comments. The content of the comments
91+
isn't included in the rendered pages.
8992

9093
Twig also contains **filters**, which modify content before being rendered.
9194
The following makes the ``title`` variable all uppercase before rendering

book/testing.rst

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -525,31 +525,28 @@ selects the last one on the page, and then selects its immediate parent element:
525525

526526
Many other methods are also available:
527527

528-
+------------------------+----------------------------------------------------+
529-
| Method | Description |
530-
+========================+====================================================+
531-
| ``filter('h1.title')`` | Nodes that match the CSS selector |
532-
+------------------------+----------------------------------------------------+
533-
| ``filterXpath('h1')`` | Nodes that match the XPath expression |
534-
+------------------------+----------------------------------------------------+
535-
| ``eq(1)`` | Node for the specified index |
536-
+------------------------+----------------------------------------------------+
537-
| ``first()`` | First node |
538-
+------------------------+----------------------------------------------------+
539-
| ``last()`` | Last node |
540-
+------------------------+----------------------------------------------------+
541-
| ``siblings()`` | Siblings |
542-
+------------------------+----------------------------------------------------+
543-
| ``nextAll()`` | All following siblings |
544-
+------------------------+----------------------------------------------------+
545-
| ``previousAll()`` | All preceding siblings |
546-
+------------------------+----------------------------------------------------+
547-
| ``parents()`` | Returns the parent nodes |
548-
+------------------------+----------------------------------------------------+
549-
| ``children()`` | Returns children nodes |
550-
+------------------------+----------------------------------------------------+
551-
| ``reduce($lambda)`` | Nodes for which the callable does not return false |
552-
+------------------------+----------------------------------------------------+
528+
``filter('h1.title')``
529+
Nodes that match the CSS selector.
530+
``filterXpath('h1')``
531+
Nodes that match the XPath expression.
532+
``eq(1)``
533+
Node for the specified index.
534+
``first()``
535+
First node.
536+
``last()``
537+
Last node.
538+
``siblings()``
539+
Siblings.
540+
``nextAll()``
541+
All following siblings.
542+
``previousAll()``
543+
All preceding siblings.
544+
``parents()``
545+
Returns the parent nodes.
546+
``children()``
547+
Returns children nodes.
548+
``reduce($lambda)``
549+
Nodes for which the callable does not return false.
553550

554551
Since each of these methods returns a new ``Crawler`` instance, you can
555552
narrow down your node selection by chaining the method calls::

components/http_foundation/introduction.rst

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -90,47 +90,47 @@ instance (or a sub-class of), which is a data holder class:
9090
All :class:`Symfony\\Component\\HttpFoundation\\ParameterBag` instances have
9191
methods to retrieve and update its data:
9292

93-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::all`: Returns
94-
the parameters;
93+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::all`
94+
Returns the parameters.
9595

96-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::keys`: Returns
97-
the parameter keys;
96+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::keys`
97+
Returns the parameter keys.
9898

99-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::replace`:
100-
Replaces the current parameters by a new set;
99+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::replace`
100+
Replaces the current parameters by a new set.
101101

102-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::add`: Adds
103-
parameters;
102+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::add`
103+
Adds parameters.
104104

105-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::get`: Returns a
106-
parameter by name;
105+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::get`
106+
Returns a parameter by name.
107107

108-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::set`: Sets a
109-
parameter by name;
108+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::set`
109+
Sets a parameter by name.
110110

111-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::has`: Returns
112-
``true`` if the parameter is defined;
111+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::has`
112+
Returns ``true`` if the parameter is defined.
113113

114-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::remove`: Removes
115-
a parameter.
114+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::remove`
115+
Removes a parameter.
116116

117117
The :class:`Symfony\\Component\\HttpFoundation\\ParameterBag` instance also
118118
has some methods to filter the input values:
119119

120-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getAlpha`: Returns
121-
the alphabetic characters of the parameter value;
120+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getAlpha`
121+
Returns the alphabetic characters of the parameter value;
122122

123-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getAlnum`: Returns
124-
the alphabetic characters and digits of the parameter value;
123+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getAlnum`
124+
Returns the alphabetic characters and digits of the parameter value;
125125

126-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getDigits`: Returns
127-
the digits of the parameter value;
126+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getDigits`
127+
Returns the digits of the parameter value;
128128

129-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getInt`: Returns the
130-
parameter value converted to integer;
129+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::getInt`
130+
Returns the parameter value converted to integer;
131131

132-
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::filter`: Filters the
133-
parameter by using the PHP :phpfunction:`filter_var` function.
132+
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::filter`
133+
Filters the parameter by using the PHP :phpfunction:`filter_var` function.
134134

135135
All getters takes up to three arguments: the first one is the parameter name
136136
and the second one is the default value to return if the parameter does not
@@ -241,14 +241,14 @@ Accessing `Accept-*` Headers Data
241241
You can easily access basic data extracted from ``Accept-*`` headers
242242
by using the following methods:
243243

244-
* :method:`Symfony\\Component\\HttpFoundation\\Request::getAcceptableContentTypes`:
245-
returns the list of accepted content types ordered by descending quality;
244+
:method:`Symfony\\Component\\HttpFoundation\\Request::getAcceptableContentTypes`
245+
Returns the list of accepted content types ordered by descending quality.
246246

247-
* :method:`Symfony\\Component\\HttpFoundation\\Request::getLanguages`:
248-
returns the list of accepted languages ordered by descending quality;
247+
:method:`Symfony\\Component\\HttpFoundation\\Request::getLanguages`
248+
Returns the list of accepted languages ordered by descending quality.
249249

250-
* :method:`Symfony\\Component\\HttpFoundation\\Request::getCharsets`:
251-
returns the list of accepted charsets ordered by descending quality.
250+
:method:`Symfony\\Component\\HttpFoundation\\Request::getCharsets`
251+
Returns the list of accepted charsets ordered by descending quality.
252252

253253
.. versionadded:: 2.2
254254
The :class:`Symfony\\Component\\HttpFoundation\\AcceptHeader` class was

quick_tour/the_architecture.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ Understanding the Directory Structure
1313
The directory structure of a Symfony :term:`application` is rather flexible,
1414
but the recommended structure is as follows:
1515

16-
* ``app/``: the application configuration, templates and translations;
17-
* ``src/``: the project's PHP code;
18-
* ``vendor/``: the third-party dependencies;
19-
* ``web/``: the web root directory.
16+
``app/``
17+
The application configuration, templates and translations.
18+
``src/``
19+
The project's PHP code.
20+
``vendor/``
21+
The third-party dependencies.
22+
``web/``
23+
The web root directory.
2024

2125
The ``web/`` Directory
2226
~~~~~~~~~~~~~~~~~~~~~~
@@ -52,10 +56,11 @@ configuration and as such, it is stored in the ``app/`` directory.
5256

5357
This class must implement two methods:
5458

55-
* ``registerBundles()`` must return an array of all bundles needed to run the
56-
application, as explained in the next section;
57-
* ``registerContainerConfiguration()`` loads the application configuration
58-
(more on this later).
59+
``registerBundles()``
60+
Must return an array of all bundles needed to run the application, as explained
61+
in the next section.
62+
``registerContainerConfiguration()``
63+
Loads the application configuration (more on this later).
5964

6065
Autoloading is handled automatically via `Composer`_, which means that you
6166
can use any PHP class without doing anything at all! All dependencies

quick_tour/the_view.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ A Twig template is a text file that can generate any type of content (HTML, CSS,
1818
JavaScript, XML, CSV, LaTeX, etc.) Twig elements are separated from the rest of
1919
the template contents using any of these delimiters:
2020

21-
* ``{{ ... }}``: prints the content of a variable or the result of evaluating an
22-
expression;
21+
``{{ ... }}``
22+
Prints the content of a variable or the result of evaluating an expression;
2323

24-
* ``{% ... %}``: controls the logic of the template; it is used for example to
25-
execute ``for`` loops and ``if`` statements;
24+
``{% ... %}``
25+
Controls the logic of the template; it is used for example to execute ``for``
26+
loops and ``if`` statements.
2627

27-
* ``{# ... #}``: allows including comments inside templates. Contrary to HTML
28-
comments, they aren't included in the rendered template.
28+
``{# ... #}``
29+
Allows including comments inside templates. Contrary to HTML comments, they
30+
aren't included in the rendered template.
2931

3032
Below is a minimal template that illustrates a few basics, using two variables
3133
``page_title`` and ``navigation``, which would be passed into the template:

0 commit comments

Comments
 (0)
0