services:
    oro_comment.association_helper:
        class: Oro\Bundle\CommentBundle\Tools\CommentAssociationHelper
        public: false
        arguments:
            - '@oro_entity_config.config_manager'

    oro_comment.migration.extension.comment:
        class: Oro\Bundle\CommentBundle\Migration\Extension\CommentExtension
        tags:
            - { name: oro_migration.extension, extension_name: comment }

    oro_comment.entity_field.comment_extension:
        class: Oro\Bundle\CommentBundle\EntityExtend\CommentEntityFieldExtension
        tags:
            - { name: 'oro_entity_extend.entity_field_extension', priority: 30 }

    oro_comment.entity_config_dumper.extension:
        class: Oro\Bundle\CommentBundle\Tools\CommentEntityConfigDumperExtension
        parent: oro_entity_extend.entity_config_dumper.extension.association
        tags:
            - { name: oro_entity_extend.entity_config_dumper_extension }

    oro_comment.exclusion_provider:
        class: Oro\Bundle\CommentBundle\Provider\CommentExclusionProvider
        public: false
        tags:
            - { name: oro_entity.exclusion_provider.api }

    oro_comment.comment.api_manager:
        class: Oro\Bundle\CommentBundle\Entity\Manager\CommentApiManager
        public: true
        arguments:
            - '@doctrine'
            - '@security.authorization_checker'
            - '@oro_entity.entity_name_resolver'
            - '@oro_batch.orm.query_builder.count_query_optimizer'
            - '@event_dispatcher'
            - '@oro_attachment.provider.attachment'
            - '@oro_security.acl_helper'
            - '@oro_entity_config.config_manager'
        calls:
            - [setPictureSourcesProvider, ['@oro_attachment.provider.picture_sources']]
            - [setHtmlTagHelper, ['@oro_ui.html_tag_helper']]

    oro_comment.comment_lifecycle_listener:
        class: Oro\Bundle\CommentBundle\EventListener\CommentLifecycleListener
        arguments:
            - '@oro_security.token_accessor'
        tags:
            - { name: doctrine.orm.entity_listener, entity: Oro\Bundle\CommentBundle\Entity\Comment, event: preUpdate }

    oro_comment.placeholder.filter:
        class: Oro\Bundle\CommentBundle\Placeholder\CommentPlaceholderFilter
        public: true
        arguments:
            - '@oro_comment.association_helper'
            - '@oro_entity.doctrine_helper'
            - '@security.authorization_checker'

    Oro\Bundle\CommentBundle\EntityConfig\CommentEntityConfiguration:
        tags:
            - oro_entity_config.validation.entity_config
