parameters:
    icap_portfolio.repository.widget.class: Icap\PortfolioBundle\Repository\Widget\AbstractWidgetRepository
    icap_portfolio.repository.widget_type.class: Icap\PortfolioBundle\Repository\Widget\WidgetTypeRepository

services:
    # repositories
    icap_portfolio.repository.widget_type:
        class:           %icap_portfolio.repository.widget_type.class%
        factory_service: doctrine.orm.entity_manager
        factory_method:  getRepository
        arguments:
            - IcapPortfolioBundle:Widget\WidgetType
    icap_portfolio.repository.widget:
        class:           %icap_portfolio.repository.widget.class%
        factory_service: doctrine.orm.entity_manager
        factory_method:  getRepository
        arguments:
            - IcapPortfolioBundle:Widget\AbstractWidget

    #notification listeners
    icap.listener.portfolio.notification_listener:
        class: Icap\PortfolioBundle\Listener\NotificationListener
        calls:
            - [setContainer, ["@service_container"]]
        tags:
            - { name: kernel.event_listener, event: create_notification_item_portfolio-remove_guide, method: onCreateNotificationItem }
            - { name: kernel.event_listener, event: create_notification_item_portfolio-add_guide,    method: onCreateNotificationItem }
            - { name: kernel.event_listener, event: create_notification_item_portfolio-add_viewer,   method: onCreateNotificationItem }

    icap.listener.portfolio.log_listener:
        class: Icap\PortfolioBundle\Listener\LogListener
        calls:
            - [setContainer, ["@service_container"]]
        tags:
            - { name: kernel.event_listener, event: create_log_details_portfolio-remove_guide, method: onCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_portfolio-add_guide,    method: onCreateLogDetails }
            - { name: kernel.event_listener, event: create_log_details_portfolio-add_viewer,   method: onCreateLogDetails }

            - { name: kernel.event_listener, event: create_log_list_item_portfolio-remove_guide, method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_portfolio-add_guide,    method: onCreateLogListItem }
            - { name: kernel.event_listener, event: create_log_list_item_portfolio-add_viewer,   method: onCreateLogListItem }