# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
     sonata.media.admin.gallery_has_media.class: AppBundle\Admin\GalleryHasMediaAdmin

services:
    app.event_listener.serializer_subscriber:
        class: AppBundle\EventListener\SerializerSubscriber
        arguments: ["@sonata.media.controller.api.media", "@router"]
        tags:
            - { name: jms_serializer.event_subscriber }

    app.twig_extension:
        class: AppBundle\Twig\AppExtension
        public: false
        arguments: ["@doctrine.orm.entity_manager"]
        tags:
            - { name: twig.extension }

    two_performance_events_per_day_validator:
        class: AppBundle\Validator\TwoPerformanceEventsPerDayValidator
        arguments: ["@=service('doctrine.orm.default_entity_manager').getRepository('AppBundle:PerformanceEvent')", "@translator"]
        tags:
            - { name: validator.constraint_validator, alias: two_performance_events_per_day }

# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
     sonata.media.admin.gallery_has_media.class: AppBundle\Admin\GalleryHasMediaAdmin

services:
    app.event_listener.serializer_subscriber:
        class: AppBundle\EventListener\SerializerSubscriber
        arguments: ["@sonata.media.controller.api.media", "@router"]
        tags:
            - { name: jms_serializer.event_subscriber }

    app.twig_extension:
        class: AppBundle\Twig\AppExtension
        public: false
        arguments: ["@doctrine.orm.entity_manager"]
        tags:
            - { name: twig.extension }

    two_performance_events_per_day_validator:
        class: AppBundle\Validator\TwoPerformanceEventsPerDayValidator
        arguments: ["@=service('doctrine.orm.default_entity_manager').getRepository('AppBundle:PerformanceEvent')", "@translator"]
        tags:
            - { name: validator.constraint_validator, alias: two_performance_events_per_day }

    min_size_slider_image_validator:
        class: AppBundle\Validator\MinSizeSliderImageValidator
        arguments: ["@translator"]
        tags:
            - { name: validator.constraint_validator, alias: min_size_slider_image }

Add service validator for performance entity
Add service validator for performance entity
