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

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.
        public:
            false # Allows optimizing the container by removing unused services; this also means
            # fetching services directly from the container via $container->get() won't work.
            # The best practice is to be explicit about your dependencies anyway.

        bind:
            $import_maping: '%import_maping%'

    # makes classes in src/ available to be used as services
    # this creates a service per class whose id is the fully-qualified class name
    App\:
        resource: '../src/'
        exclude:
          - '../src/Entity/'
          - '../src/Kernel.php'

    # controllers are imported separately to make sure services can be injected
    # as action arguments even if you don't extend any base controller class
    App\Controller\:
        resource: '../src/Controller/'
        tags: ['controller.service_arguments']

    App\Security\PasswordHash: ~

    # add more service definitions when explicit configuration is needed
    # please note that last definitions always *replace* previous ones
    app.admin.subscription:
        class: App\Admin\SubscriptionAdmin
        tags:
            - {
                name: sonata.admin,
                label: Subscriptions,
                model_class: App\Entity\Subscription,
                controller: App\Controller\Admin\SubscriptionAdminController,
                manager_type: orm,
                group: Subscriptions
              }

    app.admin.season:
        class: App\Admin\SeasonAdmin
        tags:
            - {
                name: sonata.admin,
                label: Seasons,
                model_class: App\Entity\Season,
                controller:  App\Controller\Admin\SeasonAdminController,
                manager_type: orm,
                group: Subscriptions
              }

    app.admin.slot:
        class: App\Admin\SlotAdmin
        tags:
            - {
                name: sonata.admin,
                label: Slots,
                model_class: App\Entity\Slot,
                manager_type: orm,
                group: Subscriptions,
              }

    app.admin.payment:
        class: App\Admin\PaymentAdmin
        tags:
            - {
                name: sonata.admin,
                label: Payments,
                model_class: App\Entity\Payment,
                manager_type: orm,
                group: Payments,
               }

    app.admin.user:
        class: App\Admin\UserAdmin
        tags:
            - {
                name: sonata.admin,
                label: User,
                model_class: App\Entity\User,
                manager_type: orm,
                group: Subscriptions,
              }

    app.admin.block.stats:
        class: App\Block\StatsBlockService
        tags:
            - { name: sonata.block }
