parameters:
    oro_wamp.publisher.class:             Oro\Bundle\SyncBundle\Wamp\TopicPublisher
    oro_wamp.db_ping.class:               Oro\Bundle\SyncBundle\Wamp\DbPing
    oro_wamp.twig.class:                  Oro\Bundle\SyncBundle\Twig\OroSyncExtension
    oro_wamp.listener.maintenance.class:  Oro\Bundle\SyncBundle\EventListener\MaintenanceListener

services:
    oro_wamp.publisher:
        class:                            %oro_wamp.publisher.class%
        arguments:
            - %websocket_host%
            - %websocket_port%

    oro_wamp.db_ping:
        class:                            %oro_wamp.db_ping.class%
        arguments:
            - "@?doctrine.dbal.default.wrapped_connection"

    oro_wamp.twig.sync_extension:
        class:                            %oro_wamp.twig.class%
        arguments:
            - "@oro_wamp.publisher"
        tags:
            - { name: twig.extension }

    kernel.listener.maintenance.event:
        class:                            %oro_wamp.listener.maintenance.class%
        arguments:
            - "@oro_wamp.publisher"
            - "@oro_security.security_facade"
            - "@logger"
        tags:
            - { name: kernel.event_listener, event: maintenance.on, method: onModeOn }
            - { name: kernel.event_listener, event: maintenance.off, method: onModeOff }
