services:
    notimeo.article.listener.search_engine:
        class: App\ArticleBundle\EventListener\ArticleSearchEngineListener
        tags:
            - { name: kernel.event_listener, event: notimeo.search_engine }

    notimeo.article.listener.breadcrumbs:
        class: App\ArticleBundle\EventListener\ArticleBreadcrumbListener
        tags:
            - { name: kernel.event_listener, event: notimeo.breadcrumbs }
        arguments:
            - '@app.breadcrumbs_services'
            - '@notimeo.sections_container'


    notimeo.article_category.form.type.select:
        class: App\ArticleBundle\Form\Type\ArticleCategorySelectType
        arguments:
            - "@request_stack"
            - "@notimeo.tree"
            - "@doctrine.orm.entity_manager"
        tags:
            - { name: form.type, alias: 'notimeo.menu.tree' }

    notimeo.articles.form.search_engine:
        class: App\ArticleBundle\Form\Type\SearchArticlesType
        tags:
            - { name: form.type }
        arguments:
            - '@router'
            - '@notimeo.sections_container'
            - "@request_stack"
            - '@doctrine.orm.entity_manager'

    notimeo.article_sitemap_listener:
        class: App\ArticleBundle\EventListener\ArticleSitemapListener
        tags:
            - { name: kernel.event_listener, event:  notimeo.sitemap}

    notimeo.article.categories.twig.extension:
        class: App\ArticleBundle\Twig\ArticlesCategoriesExtension
        arguments:
            - '@doctrine.orm.entity_manager'
            - '@notimeo.sections_container'
            - '@twig'
            - '@notimeo.tree'
            - '@notimeo.article.counter'
        public: false
        tags:
            - { name: twig.extension }

    notimeo.article.counter:
        class: App\ArticleBundle\Services\ArticlesCounter
        arguments:
            - '@doctrine.orm.entity_manager'