In Drupal 7 generating a link to the frontpage was done by url(''). We need something similar with using the UrlGenerator coming from symfony.
The generate() method of the url generator just accepts the route name, so let's introduce a new pseudo-route to the frontpage, called 'front' which
can be used to provide a url to the frontpage.
This basically replaces the need for PathProcessorFront::processOutbound. On the other hand, we still need PathProcessorFront::processInbound, which then replaces the incoming frontpage with the actual configured frontpage path.
There is still some code in PathProcessorFront which deals with the frontpage, though this needs to be kept as long as url('') will be still supported.
Why is there no dynamic route created which has the pattern of the configured frontpage
The goal here is to be able to produce a link to the frontpage using the url generator, which needs a routename.
If you put the system.site.front variable as pattern, you would link to that page instead.
|PASSED: [[SimpleTest]]: [MySQL] 58,012 pass(es). |
[ View ]
|PASSED: [[SimpleTest]]: [MySQL] 57,735 pass(es). |
[ View ]