Skip to content

Commit 3fd3963

Browse files
Changed to definition lists from Book section
1 parent dda1905 commit 3fd3963

File tree

6 files changed

+124
-103
lines changed

6 files changed

+124
-103
lines changed

book/forms.rst

+15-12
Original file line numberDiff line numberDiff line change
@@ -716,14 +716,16 @@ the correct values of a number of field options.
716716
And though you'll need to manually add your server-side validation, these
717717
field type options can then be guessed from that information.
718718

719-
* ``required``: The ``required`` option can be guessed based on the validation
720-
rules (i.e. is the field ``NotBlank`` or ``NotNull``) or the Doctrine metadata
721-
(i.e. is the field ``nullable``). This is very useful, as your client-side
722-
validation will automatically match your validation rules.
719+
``required``
720+
The ``required`` option can be guessed based on the validation rules (i.e. is
721+
the field ``NotBlank`` or ``NotNull``) or the Doctrine metadata (i.e. is the
722+
field ``nullable``). This is very useful, as your client-side validation will
723+
automatically match your validation rules.
723724

724-
* ``max_length``: If the field is some sort of text field, then the ``max_length``
725-
option can be guessed from the validation constraints (if ``Length`` or
726-
``Range`` is used) or from the Doctrine metadata (via the field's length).
725+
``max_length``
726+
If the field is some sort of text field, then the ``max_length`` option can be
727+
guessed from the validation constraints (if ``Length`` or ``Range`` is used) or
728+
from the Doctrine metadata (via the field's length).
727729

728730
.. note::
729731

@@ -771,12 +773,13 @@ of code. Of course, you'll usually need much more flexibility when rendering:
771773
You already know the ``form_start()`` and ``form_end()`` functions, but what do
772774
the other functions do?
773775

774-
* ``form_errors(form)`` - Renders any errors global to the whole form
775-
(field-specific errors are displayed next to each field);
776+
``form_errors(form)``
777+
Renders any errors global to the whole form (field-specific errors are displayed
778+
next to each field).
776779

777-
* ``form_row(form.dueDate)`` - Renders the label, any errors, and the HTML
778-
form widget for the given field (e.g. ``dueDate``) inside, by default, a
779-
``div`` element.
780+
``form_row(form.dueDate)``
781+
Renders the label, any errors, and the HTML form widget for the given field
782+
(e.g. ``dueDate``) inside, by default, a ``div`` element.
780783

781784
The majority of the work is done by the ``form_row`` helper, which renders
782785
the label, errors and HTML form widget of each field inside a ``div`` tag by

book/http_cache.rst

+45-37
Original file line numberDiff line numberDiff line change
@@ -202,34 +202,39 @@ method::
202202

203203
Here is a list of the main options:
204204

205-
* ``default_ttl``: The number of seconds that a cache entry should be
206-
considered fresh when no explicit freshness information is provided in a
207-
response. Explicit ``Cache-Control`` or ``Expires`` headers override this
208-
value (default: ``0``);
209-
210-
* ``private_headers``: Set of request headers that trigger "private"
211-
``Cache-Control`` behavior on responses that don't explicitly state whether
212-
the response is ``public`` or ``private`` via a ``Cache-Control`` directive.
213-
(default: ``Authorization`` and ``Cookie``);
214-
215-
* ``allow_reload``: Specifies whether the client can force a cache reload by
216-
including a ``Cache-Control`` "no-cache" directive in the request. Set it to
217-
``true`` for compliance with RFC 2616 (default: ``false``);
218-
219-
* ``allow_revalidate``: Specifies whether the client can force a cache
220-
revalidate by including a ``Cache-Control`` "max-age=0" directive in the
221-
request. Set it to ``true`` for compliance with RFC 2616 (default: false);
222-
223-
* ``stale_while_revalidate``: Specifies the default number of seconds (the
224-
granularity is the second as the Response TTL precision is a second) during
225-
which the cache can immediately return a stale response while it revalidates
226-
it in the background (default: ``2``); this setting is overridden by the
227-
``stale-while-revalidate`` HTTP ``Cache-Control`` extension (see RFC 5861);
228-
229-
* ``stale_if_error``: Specifies the default number of seconds (the granularity
230-
is the second) during which the cache can serve a stale response when an
231-
error is encountered (default: ``60``). This setting is overridden by the
232-
``stale-if-error`` HTTP ``Cache-Control`` extension (see RFC 5861).
205+
``default_ttl``
206+
The number of seconds that a cache entry should be considered fresh when no
207+
explicit freshness information is provided in a response. Explicit
208+
``Cache-Control`` or ``Expires`` headers override this value (default: ``0``).
209+
210+
``private_headers``
211+
Set of request headers that trigger "private" ``Cache-Control`` behavior on
212+
responses that don't explicitly state whether the response is ``public`` or
213+
``private`` via a ``Cache-Control`` directive (default: ``Authorization``
214+
and ``Cookie``).
215+
216+
``allow_reload``
217+
Specifies whether the client can force a cache reload by including a
218+
``Cache-Control`` "no-cache" directive in the request. Set it to ``true`` for
219+
compliance with RFC 2616 (default: ``false``).
220+
221+
``allow_revalidate``
222+
Specifies whether the client can force a cache revalidate by including a
223+
``Cache-Control`` "max-age=0" directive in the request. Set it to ``true`` for
224+
compliance with RFC 2616 (default: false).
225+
226+
``stale_while_revalidate``
227+
Specifies the default number of seconds (the granularity is the second as the
228+
Response TTL precision is a second) during which the cache can immediately
229+
return a stale response while it revalidates it in the background (default:
230+
``2``); this setting is overridden by the ``stale-while-revalidate`` HTTP
231+
``Cache-Control`` extension (see RFC 5861).
232+
233+
``stale_if_error``
234+
Specifies the default number of seconds (the granularity is the second) during
235+
which the cache can serve a stale response when an error is encountered
236+
(default: ``60``). This setting is overridden by the ``stale-if-error`` HTTP
237+
``Cache-Control`` extension (see RFC 5861).
233238

234239
If ``debug`` is ``true``, Symfony automatically adds a ``X-Symfony-Cache``
235240
header to the response containing useful information about cache hits and
@@ -339,11 +344,12 @@ and then returned to every subsequent user who asked for their account page!
339344

340345
To handle this situation, every response may be set to be public or private:
341346

342-
* *public*: Indicates that the response may be cached by both private and
343-
shared caches;
347+
*public*
348+
Indicates that the response may be cached by both private and shared caches.
344349

345-
* *private*: Indicates that all or part of the response message is intended
346-
for a single user and must not be cached by a shared cache.
350+
*private*
351+
Indicates that all or part of the response message is intended for a single
352+
user and must not be cached by a shared cache.
347353

348354
Symfony conservatively defaults each response to be private. To take advantage
349355
of shared caches (like the Symfony reverse proxy), the response will need
@@ -1033,12 +1039,14 @@ possible.
10331039

10341040
The ``render_esi`` helper supports two other useful options:
10351041

1036-
* ``alt``: used as the ``alt`` attribute on the ESI tag, which allows you
1037-
to specify an alternative URL to be used if the ``src`` cannot be found;
1042+
``alt``
1043+
Used as the ``alt`` attribute on the ESI tag, which allows you to specify an
1044+
alternative URL to be used if the ``src`` cannot be found.
10381045

1039-
* ``ignore_errors``: if set to true, an ``onerror`` attribute will be added
1040-
to the ESI with a value of ``continue`` indicating that, in the event of
1041-
a failure, the gateway cache will simply remove the ESI tag silently.
1046+
``ignore_errors``
1047+
If set to true, an ``onerror`` attribute will be added to the ESI with a value
1048+
of ``continue`` indicating that, in the event of a failure, the gateway cache
1049+
will simply remove the ESI tag silently.
10421050

10431051
.. index::
10441052
single: Cache; Invalidation

book/http_fundamentals.rst

+20-18
Original file line numberDiff line numberDiff line change
@@ -515,30 +515,32 @@ libraries that can be used inside *any* PHP project. These libraries, called
515515
the *Symfony Components*, contain something useful for almost any situation,
516516
regardless of how your project is developed. To name a few:
517517

518-
* :doc:`HttpFoundation </components/http_foundation/introduction>` - Contains
519-
the ``Request`` and ``Response`` classes, as well as other classes for handling
520-
sessions and file uploads;
518+
:doc:`HttpFoundation </components/http_foundation/introduction>`
519+
Contains the ``Request`` and ``Response`` classes, as well as other classes for
520+
handling sessions and file uploads.
521521

522-
* :doc:`Routing </components/routing/introduction>` - Powerful and fast routing system that
523-
allows you to map a specific URI (e.g. ``/contact``) to some information
524-
about how that request should be handled (e.g. execute the ``contactAction()``
525-
method);
522+
:doc:`Routing </components/routing/introduction>`
523+
Powerful and fast routing system that allows you to map a specific URI
524+
(e.g. ``/contact``) to some information about how that request should be handled
525+
(e.g. execute the ``contactAction()`` method).
526526

527-
* :doc:`Form </components/form/introduction>` - A full-featured and flexible
528-
framework for creating forms and handling form submissions;
527+
:doc:`Form </components/form/introduction>`
528+
A full-featured and flexible framework for creating forms and handling form
529+
submissions.
529530

530-
* `Validator`_ - A system for creating rules about data and then validating
531-
whether or not user-submitted data follows those rules;
531+
`Validator`_
532+
A system for creating rules about data and then validating whether or not
533+
user-submitted data follows those rules.
532534

533-
* :doc:`Templating </components/templating/introduction>` - A toolkit for rendering
534-
templates, handling template inheritance (i.e. a template is decorated with
535-
a layout) and performing other common template tasks;
535+
:doc:`Templating </components/templating/introduction>`
536+
A toolkit for rendering templates, handling template inheritance (i.e. a
537+
template is decorated with a layout) and performing other common template tasks.
536538

537-
* :doc:`Security </components/security/introduction>` - A powerful library for
538-
handling all types of security inside an application;
539+
:doc:`Security </components/security/introduction>`
540+
A powerful library for handling all types of security inside an application.
539541

540-
* :doc:`Translation </components/translation/introduction>` - A framework for
541-
translating strings in your application.
542+
:doc:`Translation </components/translation/introduction>`
543+
A framework for translating strings in your application.
542544

543545
Each and every one of these components is decoupled and can be used in *any*
544546
PHP project, regardless of whether or not you use the Symfony framework.

book/internals.rst

+16-16
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,15 @@ Each event thrown by the Kernel is a subclass of
212212
:class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`. This means that
213213
each event has access to the same basic information:
214214

215-
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequestType`
216-
- returns the *type* of the request (``HttpKernelInterface::MASTER_REQUEST``
217-
or ``HttpKernelInterface::SUB_REQUEST``);
215+
:method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequestType`
216+
Returns the *type* of the request (``HttpKernelInterface::MASTER_REQUEST`` or
217+
``HttpKernelInterface::SUB_REQUEST``).
218218

219-
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getKernel`
220-
- returns the Kernel handling the request;
219+
:method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getKernel`
220+
Returns the Kernel handling the request.
221221

222-
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequest`
223-
- returns the current ``Request`` being handled.
222+
:method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequest`
223+
Returns the current ``Request`` being handled.
224224

225225
``getRequestType()``
226226
....................
@@ -347,18 +347,18 @@ The purpose of this event is to allow other systems to modify or replace the
347347

348348
The FrameworkBundle registers several listeners:
349349

350-
* :class:`Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener`:
351-
collects data for the current request;
350+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener`
351+
Collects data for the current request.
352352

353-
* :class:`Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener`:
354-
injects the Web Debug Toolbar;
353+
:class:`Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener`
354+
Injects the Web Debug Toolbar.
355355

356-
* :class:`Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener`: fixes the
357-
Response ``Content-Type`` based on the request format;
356+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener`
357+
Fixes the Response ``Content-Type`` based on the request format.
358358

359-
* :class:`Symfony\\Component\\HttpKernel\\EventListener\\EsiListener`: adds a
360-
``Surrogate-Control`` HTTP header when the Response needs to be parsed for
361-
ESI tags.
359+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\EsiListener`
360+
Adds a ``Surrogate-Control`` HTTP header when the Response needs to be parsed
361+
for ESI tags.
362362

363363
.. seealso::
364364

book/templating.rst

+21-14
Original file line numberDiff line numberDiff line change
@@ -384,15 +384,16 @@ Template Naming and Locations
384384

385385
By default, templates can live in two different locations:
386386

387-
* ``app/Resources/views/``: The applications ``views`` directory can contain
388-
application-wide base templates (i.e. your application's layouts and
389-
templates of the application bundle) as well as templates that override
390-
third party bundle templates (see :ref:`overriding-bundle-templates`);
387+
``app/Resources/views/``
388+
The applications ``views`` directory can contain application-wide base templates
389+
(i.e. your application's layouts and templates of the application bundle) as
390+
well as templates that override third party bundle templates
391+
(see :ref:`overriding-bundle-templates`).
391392

392-
* ``path/to/bundle/Resources/views/``: Each third party bundle houses its
393-
templates in its ``Resources/views/`` directory (and subdirectories). When you
394-
plan to share your bundle, you should put the templates in the bundle instead
395-
of the ``app/`` directory.
393+
``path/to/bundle/Resources/views/``
394+
Each third party bundle houses its templates in its ``Resources/views/``
395+
directory (and subdirectories). When you plan to share your bundle, you should
396+
put the templates in the bundle instead of the ``app/`` directory.
396397

397398
Most of the templates you'll use live in the ``app/Resources/views/``
398399
directory. The path you'll use will be relative to this directory. For example,
@@ -1123,12 +1124,18 @@ is a :class:`Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables`
11231124
instance which will give you access to some application specific variables
11241125
automatically:
11251126

1126-
* ``app.security`` - The security context.
1127-
* ``app.user`` - The current user object.
1128-
* ``app.request`` - The request object.
1129-
* ``app.session`` - The session object.
1130-
* ``app.environment`` - The current environment (dev, prod, etc).
1131-
* ``app.debug`` - True if in debug mode. False otherwise.
1127+
``app.security``
1128+
The security context.
1129+
``app.user``
1130+
The current user object.
1131+
``app.request``
1132+
The request object.
1133+
``app.session``
1134+
The session object.
1135+
``app.environment``
1136+
The current environment (dev, prod, etc).
1137+
``app.debug``
1138+
True if in debug mode. False otherwise.
11321139

11331140
.. configuration-block::
11341141

book/validation.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -809,14 +809,15 @@ user registers and when a user updates their contact information later:
809809
810810
With this configuration, there are three validation groups:
811811

812-
* ``Default`` - contains the constraints in the current class and all
813-
referenced classes that belong to no other group;
812+
``Default``
813+
Contains the constraints in the current class and all referenced classes
814+
that belong to no other group.
814815

815-
* ``User`` - equivalent to all constraints of the ``User`` object in the
816-
``Default`` group;
816+
``User``
817+
Equivalent to all constraints of the ``User`` object in the ``Default`` group.
817818

818-
* ``registration`` - contains the constraints on the ``email`` and ``password``
819-
fields only.
819+
``registration``
820+
Contains the constraints on the ``email`` and ``password`` fields only.
820821

821822
To tell the validator to use a specific group, pass one or more group names
822823
as the second argument to the ``validate()`` method::

0 commit comments

Comments
 (0)