@@ -105,36 +105,29 @@ rendered by the ``MenuFactory``.
105
105
The Factory
106
106
...........
107
107
108
- The ``ContentAwareFactory `` is a ``FactoryInterface `` implementation, which
109
- generates the full ``MenuItem `` hierarchy from the provided MenuNode. The data
110
- generated this way is later used to generate the actual HTML representation of
111
- the menu.
108
+ Menu factories generate the full ``MenuItem `` hierarchy from the provided
109
+ MenuNode. The data generated this way is later used to generate the actual HTML
110
+ representation of the menu.
112
111
113
112
The included implementation focuses on generating ``MenuItem `` instances from
114
113
``NodeInterface `` instances, as this is usually the best approach to handle
115
114
tree-like structures typically used by a CMS. Other approaches are implemented in
116
- the base classes, and their respective documentation pages can be found in
115
+ the base classes and their respective documentation pages can be found in
117
116
KnpMenuBundle _'s page.
118
117
119
- ``ContentAwareFactory `` is responsible for loading the full menu hierarchy and
120
- transforming the ``MenuNode `` instances from the root node it receives from
121
- the ``MenuProviderInterface `` implementation. It is also responsible for
122
- determining which (if any) menu item is currently being viewed by the user.
123
- It supports a voter mechanism to have custom code decide what menu item is
124
- the current item.
125
- ``KnpMenu `` already includes a specific factory targeted at Symfony2's Routing
126
- component, which this bundle extends, to add support for:
127
-
128
- * ``Route `` instances stored in a database (refer to :ref: `RoutingBundle's
129
- RouteProvider <start-routing-getting-route-object>` for more details on
130
- this)
118
+ ``KnpMenu `` already includes a specific factory targeted at the Symfony Routing
119
+ component to add support for:
120
+
121
+ * ``Route `` instances stored in a database (refer to
122
+ :ref: `RoutingBundle's RouteProvider <start-routing-getting-route-object >` for
123
+ more details on this)
131
124
* ``Route `` instances with associated content (more on this on respective
132
125
:ref: `RoutingBundle's section <start-routing-linking-a-route-with-a-model-instance >`)
133
126
134
- As mentioned before, `` ContentAwareFactory `` is responsible for loading
135
- all the menu nodes from the provided root element. The actual loaded nodes can
136
- be of any class, even if it's different from the root's, but all must
137
- implement ``NodeInterface `` in order to be included in the generated menu.
127
+ As mentioned before, the factory is responsible for loading all the menu nodes
128
+ from the provided root element. The actual loaded nodes can be of any class,
129
+ even if it's different from the root's, but all must implement
130
+ ``NodeInterface `` in order to be included in the generated menu.
138
131
139
132
The Menu Nodes
140
133
..............
0 commit comments