<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="knp_menu.factory.class">Knp\Menu\Silex\RouterAwareFactory</parameter>
        <parameter key="knp_menu.helper.class">Knp\Menu\Twig\Helper</parameter>
        <parameter key="knp_menu.menu_provider.chain.class">Knp\Menu\Provider\ChainProvider</parameter>
        <parameter key="knp_menu.menu_provider.container_aware.class">Knp\Bundle\MenuBundle\Provider\ContainerAwareProvider</parameter>
        <parameter key="knp_menu.menu_provider.builder_alias.class">Knp\Bundle\MenuBundle\Provider\BuilderAliasProvider</parameter>
        <parameter key="knp_menu.renderer_provider.class">Knp\Bundle\MenuBundle\Renderer\ContainerAwareProvider</parameter>
        <parameter key="knp_menu.renderer.list.class">Knp\Menu\Renderer\ListRenderer</parameter>
        <parameter key="knp_menu.renderer.list.options" type="collection"></parameter>
    </parameters>

    <services>
        <service id="knp_menu.factory" class="%knp_menu.factory.class%">
            <argument type="service" id="router" />
        </service>

        <service id="knp_menu.helper" class="%knp_menu.helper.class%" public="false">
            <argument type="service" id="knp_menu.renderer_provider" />
            <argument type="service" id="knp_menu.menu_provider" />
        </service>

        <service id="knp_menu.menu_provider.chain" class="%knp_menu.menu_provider.chain.class%" public="false">
            <argument type="collection" />
        </service>

        <service id="knp_menu.menu_provider.container_aware" class="%knp_menu.menu_provider.container_aware.class%" public="false">
            <argument type="service" id="service_container" />
            <argument type="collection" />
        </service>

        <service id="knp_menu.menu_provider.builder_alias" class="%knp_menu.menu_provider.builder_alias.class%" public="false">
            <argument type="service" id="kernel" />
            <argument type="service" id="service_container" />
            <argument type="service" id="knp_menu.factory" />
        </service>

        <service id="knp_menu.renderer_provider" class="%knp_menu.renderer_provider.class%">
            <argument type="service" id="service_container" />
            <argument>%knp_menu.default_renderer%</argument>
            <argument type="collection" />
        </service>

        <service id="knp_menu.renderer.list" class="%knp_menu.renderer.list.class%">
            <tag name="knp_menu.renderer" alias="list" />
            <argument>%knp_menu.renderer.list.options%</argument>
            <argument>%kernel.charset%</argument>
        </service>
    </services>

</container>
