services:
  Mvo\ContaoGroupWidget\Group\Registry:
    arguments:
      - '@twig'
      - '@request_stack'
      - '@database_connection'
      - !tagged_iterator 'mvo_contao_group.storage_factory'

  Mvo\ContaoGroupWidget\EventListener\GroupWidgetListener:
    arguments:
      - '@request_stack'
      - '@Mvo\ContaoGroupWidget\Group\Registry'
      - '@twig'

  Mvo\ContaoGroupWidget\Storage\SerializedStorageFactory:
    arguments:
      - '@database_connection'
    tags:
      - { name: 'mvo_contao_group.storage_factory' }

  Mvo\ContaoGroupWidget\Storage\EntityStorageFactory:
    arguments:
      - '@doctrine.orm.entity_manager'
    tags:
      - { name: 'mvo_contao_group.storage_factory' }
