# 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:
    app.defaultlocale: fr
    app.locales: [ en,fr ]
    app.locales.all: fr|en
    app.site.name: Tigui
    app.site.fullname: tigui.com
    app.site.tel: 0000000000
    app.site.email: contact@tigui.com
    app.site.address: Bonfi Matam Conakry
    app.facebook.id: 989167664487167
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
    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/Entity/'
            - '../src/Kernel.php'

    # add more service definitions when explicit configuration is needed
    # please note that last definitions always *replace* previous ones
    gedmo.listener.timestampable:
        class: Gedmo\Timestampable\TimestampableListener
        tags:
            - { name: doctrine.event_listener, event: 'prePersist' }
            - { name: doctrine.event_listener, event: 'onFlush' }
            - { name: doctrine.event_listener, event: 'loadClassMetadata' }
        calls:
            # Uncomment the below call if using attributes, and comment the call for the annotation reader
            # - [ setAnnotationReader, [ "@gedmo.mapping.driver.attribute" ] ]
            # The `annotation_reader` service was deprecated in Symfony 6.4 and removed in Symfony 7.0
           # - [ setAnnotationReader, [ "@gedmo.mapping.driver.attribute" ] ]

    gedmo.listener.sluggable:
        class: Gedmo\Sluggable\SluggableListener
        tags:
            - { name: doctrine.event_listener, event: 'prePersist' }
            - { name: doctrine.event_listener, event: 'onFlush' }
            - { name: doctrine.event_listener, event: 'loadClassMetadata' }


    App\EventListener\UserAddRefUserEntityListener:
        tags:
            - { name: doctrine.orm.entity_listener }

    App\EventListener\UserSignUpListener:
        tags:
            - { name: doctrine.orm.entity_listener }

    App\EventListener\SetEntityCreatorListener:
        tags:
            - { name: doctrine.event_listener, event: prePersist, method: prePersist }



