services:
  _defaults:
    autowire: true
    autoconfigure: true

  # auto register controllers as services
  AutoAdmin\Bundle\Menu\Controller\Admin\:
    resource: '../../Controller/Admin/*Controller.php'
    exclude: '../../Controller/Admin/{Traits}'
    tags:
      - 'aa_admin.controller'

  AutoAdmin\Bundle\Menu\Provider\MenuProvider:
    arguments:
      - '@knp_menu.factory'
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@AutoAdmin\Bundle\Content\Routing\ContentRouter'
      - '@AutoAdmin\Bundle\Content\ContentReference\ContentReferenceResolver'
    tags:
      - { name: 'knp_menu.provider' }

  AutoAdmin\Bundle\Menu\Twig\AutoAdminMenuExtension:
    arguments:
      - '@knp_menu.helper'
    tags:
      - 'twig.extension'

  AutoAdmin\Bundle\Menu\Setup\SetupHandler:
    tags:
      - 'setup.handler'

  AutoAdmin\Bundle\Menu\Repository\MenuRepository:
    tags:
      - 'aa_content.repository'

  AutoAdmin\Bundle\Menu\Repository\MenuItemRepository:
    tags:
      - 'aa_content.repository'

  AutoAdmin\Bundle\Menu\Controller\Admin\MenuItemController: ~

