|
21 | 21 | - Symfony\Cmf\Component\Routing\RouteReferrersReadInterface |
22 | 22 | ``` |
23 | 23 |
|
24 | | - After: |
| 24 | + After: |
25 | 25 | |
26 | 26 | ```yaml |
27 | 27 | # app/config/config.yml |
|
53 | 53 | - cmf_routing.redirect_route_admin |
54 | 54 | ``` |
55 | 55 |
|
56 | | - After: |
| 56 | + After: |
57 | 57 | |
58 | 58 | ```yaml |
59 | 59 | # app/config/config.yml |
|
70 | 70 |
|
71 | 71 | * The settings `admin_basepath` and `content_basepath` are only relevant for the admin and thus have been moved as well. |
72 | 72 |
|
73 | | - **Before** |
| 73 | + Before: |
| 74 | + |
74 | 75 | ```yaml |
75 | 76 | cmf_routing: |
76 | 77 | # ... |
|
93 | 94 | </config> |
94 | 95 | ``` |
95 | 96 |
|
96 | | - **After** |
| 97 | + After: |
| 98 | + |
97 | 99 | ```yaml |
98 | 100 | cmf_sonata_phpcr_admin_integration: |
99 | 101 | # ... |
|
113 | 115 | </config> |
114 | 116 | ``` |
115 | 117 |
|
116 | | -## Route Model |
| 118 | +### Route Model |
117 | 119 |
|
118 | 120 | * Removed `getAddFormatPattern()`/`setAddFormatPattern()` from the model |
119 | 121 | `Route` and `getAddTrailingSlash()`/`setAddTrailingSlash()` from the PHPCR |
120 | 122 | `Route`. Use `getOption()`/`setOption()` with `'add_format_pattern'` or |
121 | 123 | `'add_trailing_slash'` instead. |
122 | 124 |
|
123 | | - **Before** |
| 125 | + Before: |
| 126 | + |
124 | 127 | ```php |
125 | 128 | $route->setAddFormatPattern(true); |
126 | 129 | $route->setAddTrailingSlash(true); |
|
130 | 133 | } |
131 | 134 | ``` |
132 | 135 |
|
133 | | - **After** |
| 136 | + After: |
| 137 | + |
134 | 138 | ```php |
135 | 139 | $route->setOption('add_format_pattern', true); |
136 | 140 | $route->setOption('add_trailing_slash', true); |
|
143 | 147 | * Removed `getParent()`/`setParent()` from PHPCR `Route` and `RedirectRoute`. |
144 | 148 | Use `getParentDocument()`/`setParentDocument()` instead. |
145 | 149 |
|
146 | | - **Before** |
| 150 | + Before: |
| 151 | + |
147 | 152 | ```php |
148 | 153 | $route = new Route(); |
149 | 154 | $route->setParent($routeRoot); |
150 | 155 | ``` |
151 | 156 |
|
152 | | - **After** |
| 157 | + After: |
| 158 | + |
153 | 159 | ```php |
154 | 160 | $route = new Route(); |
155 | 161 | $route->setParentDocument($routeRoot); |
156 | 162 | ``` |
157 | 163 |
|
158 | | -## Configuration |
| 164 | +### Configuration |
159 | 165 |
|
160 | 166 | * Removed the `route_basepath` setting, use `route_basepaths` instead. |
161 | 167 |
|
162 | | - **Before** |
| 168 | + Before: |
| 169 | + |
163 | 170 | ```yaml |
164 | 171 | cmf_routing: |
165 | 172 | # ... |
|
178 | 185 | </config> |
179 | 186 | ``` |
180 | 187 |
|
181 | | - **After** |
| 188 | + After: |
| 189 | + |
182 | 190 | ```yaml |
183 | 191 | cmf_routing: |
184 | 192 | # ... |
|
198 | 206 | </dynamic> |
199 | 207 | </config> |
200 | 208 | ``` |
| 209 | + |
| 210 | +### Route Template |
| 211 | + |
| 212 | + * The `contentTemplate` request attribute is deprecated in favor of |
| 213 | + `template`. The CmfContentBundle has been adjusted accordingly. |
| 214 | + |
| 215 | + Before: |
| 216 | + |
| 217 | + ```php |
| 218 | + public function documentAction($contentDocument, $contentTemplate) |
| 219 | + { |
| 220 | + // ... |
| 221 | + } |
| 222 | + ``` |
| 223 | + |
| 224 | + After: |
| 225 | + |
| 226 | + ```php |
| 227 | + public function documentAction($contentDocument, $template) |
| 228 | + { |
| 229 | + // ... |
| 230 | + } |
| 231 | + ``` |
| 232 | + |
| 233 | + The deprecated `contentTemplate` will be kept for backwards compatibility |
| 234 | + and will be removed in version 3.0. |
0 commit comments