services:
    notimeo.validator.contains_host:
        class: Notimeo\MenuBundle\Validator\Constraints\ContainsHostValidator
        tags:
            -  name: validator.constraint_validator
               alias: contains_host
    notimeo.menu.form.type.select:
        class: Notimeo\MenuBundle\Form\Type\MenuItemSelectType
        arguments:
            - "@request_stack"
            - "@notimeo.tree"
            - "@doctrine.orm.entity_manager"
        tags:
            - { name: form.type, alias: 'notimeo.menu.tree' }

    notimeo.menu.form.type.locale:
        class: Notimeo\MenuBundle\Form\Type\MenuLocaleType
        tags:
            - { name: form.type}

    notimeo.menuitem.form.type.locale:
        class: Notimeo\MenuBundle\Form\Type\MenuItemLocaleType
        tags:
            - { name: form.type }

    notimeo.menu_extesion:
        class: Notimeo\MenuBundle\Twig\MenuExtension
        arguments:
            - "@twig"
            - "@request_stack"
            - "@translator.default"
            - "@notimeo.menu_storage"
        public: false
        tags:
            - { name: twig.extension }

    notimeo.menu_sitemap_listener:
        class: Notimeo\MenuBundle\EventListener\MenuSitemapListener
        tags:
            - { name: kernel.event_listener, event:  notimeo.sitemap}

    notimeo.menu_storage:
        class: Notimeo\MenuBundle\Services\MenuStorageService
        arguments:
            - "@notimeo.tree"
            - "@doctrine.orm.entity_manager"
            - "@request_stack"
            - "@event_dispatcher"
            - "@router"