# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.

# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:

services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

    # makes classes in src/ available to be used as services
    # this creates a service per class whose id is the fully-qualified class name
    gedmo.listener.sortable:
        class: Gedmo\Sortable\SortableListener
        calls:
            - [setAnnotationReader, ['@annotation_reader']]
        tags:
            - { name: doctrine.event_subscriber, connection: default }
    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/Entity/'
            - '../src/Kernel.php'
    admin.page:
        class: App\Admin\PageAdmin
        arguments: [~, App\Entity\Page, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Strony }
        public: true
    admin.news:
        class: App\Admin\NewsAdmin
        arguments: [~, App\Entity\News, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Aktualności }
        public: true
    admin.partners:
        class: App\Admin\PartnersAdmin
        arguments: [~, App\Entity\Partners, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Partnerzy }
        public: true
    admin.managers:
        class: App\Admin\ManagersAdmin
        arguments: [~, App\Entity\Managers, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Rada }
        public: true
    admin.speakers:
        class: App\Admin\SpeakersAdmin
        arguments: [~, App\Entity\Speakers, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Prelegenci }
        public: true
    admin.multimedia:
        class: App\Admin\MultimediaAdmin
        arguments: [~, App\Entity\Multimedia, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Multimedia }
        public: true
    admin.mediafiles:
        class: App\Admin\MediafilesAdmin
        arguments: [~, App\Entity\Mediafiles, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Dla mediów }
        public: true
    admin.calendar:
        class: App\Admin\CalendarAdmin
        arguments: [~, App\Entity\Calendar, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Kalendarz }
        public: true

    admin.contact:
        class: App\Admin\ContactAdmin
        arguments: [~, App\Entity\Contact, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Form kontaktowy }
        public: true
    admin.registration:
        class: App\Admin\RegistrationAdmin
        arguments: [~, App\Entity\Registration, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Form rejestracyjny }
        public: true
    admin.newsletter:
        class: App\Admin\NewsletterAdmin
        arguments: [~, App\Entity\Newsletter, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Newsletter }
        public: true
    admin.menuitem:
        class: App\Admin\MenuitemAdmin
        arguments: [~, App\Entity\Menuitem, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Menu elementy }
        public: true
    admin.fair:
        class: App\Admin\FairAdmin
        arguments: [~, App\Entity\Fair, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Targi }
        public: true
    admin.edition:
        class: App\Admin\EditionAdmin
        arguments: [~, App\Entity\Edition, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Edycje }
        public: true
    admin.settings:
        class: App\Admin\SettingsAdmin
        arguments: [~, App\Entity\Settings, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Ustawienia }
        public: true

    App\Service\EditionService:
        arguments:
            $entityManager: '@doctrine.orm.entity_manager'

    App\Service\SettingsService:
        arguments:
            $entityManager: '@doctrine.orm.entity_manager'

    # add more service definitions when explicit configuration is needed
    # please note that last definitions always *replace* previous ones
