Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 9a4c17c

Browse files
committed
Fix spelling error and use definition list
1 parent 71ec243 commit 9a4c17c

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

components/routing/dynamic.rst

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,28 @@ The component already provides some general purpose enhancers. They all follow
8585
the principle to never change an existing field but only add fields if they
8686
do not exist yet:
8787

88-
* ``RouteContentEnhancer``: If the route is an instance of ``RouteObjectInterface``,
89-
this enhancer sets the target field to the return value of ``getContent()``.
90-
* ``FieldMapEnhancer``: Configured with a key-value map. If a specified field of
91-
the match contains a key, the target field is set to the value.
92-
* ``FieldByClassEnhancer``: Configured with a map of class names to values.
93-
If the specified field contains an object that is an instance of a class in
94-
the map, sets the target field to the corresponding value. Note that the
95-
first match is taken, should the objects be instance of more than one of the
96-
classes. This enhancer is for example used to determine the controller and
97-
template based on the class of a Content document.
98-
This enhancer is similar to ``FieldMapEnhancer``, but doing an
99-
:phpfunction:`instanceof` check rather than string comparison for the map
100-
keys.
101-
* ``FieldPresenceEnhancer``: If a field is present in the route match, sets an
102-
other field to a specified value if that field is not set yet.
103-
* ``ContentRepositoryEnhancer``: If the source field is present in the route match,
104-
sets target field to the сontent returned by the ``ContentRepositoryInterface`` with
105-
value of the source field, if target field is not yet set.
88+
``RouteContentEnhancer``
89+
If the route is an instance of ``RouteObjectInterface``, this enhancer sets
90+
the target field to the return value of ``getContent()``.
91+
``FieldMapEnhancer``
92+
Configured with a key-value map. If a specified field of the match contains
93+
a key, the target field is set to the value.
94+
``FieldByClassEnhancer``
95+
Configured with a map of class names to values. If the specified field
96+
contains an object that is an instance of a class in the map, sets the
97+
target field to the corresponding value. Note that the first match is
98+
taken, should the objects be instance of more than one of the classes. This
99+
enhancer is for example used to determine the controller and template based
100+
on the class of a Content document. This enhancer is similar to
101+
``FieldMapEnhancer``, but doing an :phpfunction:`instanceof` check rather
102+
than string comparison for the map keys.
103+
``FieldPresenceEnhancer``
104+
If a field is present in the route match, sets an other field to a
105+
specified value if that field is not set yet.
106+
``ContentRepositoryEnhancer``
107+
If the source field is present in the route match, sets target field to the
108+
content returned by the ``ContentRepositoryInterface`` with value of the
109+
source field, if target field is not yet set.
106110

107111
You can also create your own route enhancer by creating a class which
108112
implements ``Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface``.

0 commit comments

Comments
 (0)