Symfony2 CMF Project

Routing and navigation menu components

cmf.symfony.com

An introduction to the routing and menu components.

Symfony2 routing

Solution: First Take



navigation:
    pattern: "/{url}"
    defaults: { _controller: service.controller:indexAction }
    requirements:
        url: .*

Solution: Cmf Routing component

ChainRouter



<service id="my_namespace.my_router"
         class="%my_namespace.my_router_class%">
    <tag name="router" priority="300" />
</service>
            

DynamicRouter: Match url

DynamicRouter: PHPCR-ODM

DynamicRouter: Route Enhancers



interface ControllerEnhancerInterface
{
    public function enhance(array $defaults, Request $request);
}
            

Routing and Content


DynamicRouter: Generate url from referenced content

$this->router->generate($content);
            

Menu


Routing and Content and Menu


Conclusions

Github projects

Resources