services:
    Oro\Bundle\FormBundle\Autocomplete\Security:
        alias: oro_form.autocomplete.security

    oro_form.autocomplete.security:
        class: Oro\Bundle\FormBundle\Autocomplete\Security
        public: true
        arguments:
            - !abstract '$autocompleteAclResources defined in Oro\Bundle\FormBundle\DependencyInjection\Compiler\AutocompleteCompilerPass'
            - '@security.authorization_checker'

    Oro\Bundle\FormBundle\Autocomplete\SearchRegistry:
        alias: oro_form.autocomplete.search_registry

    oro_form.autocomplete.search_registry:
        class: Oro\Bundle\FormBundle\Autocomplete\SearchRegistry
        public: true
        arguments:
            - !abstract '$searchHandlers defined in Oro\Bundle\FormBundle\DependencyInjection\Compiler\AutocompleteCompilerPass'

    oro_form.autocomplete.search_handler:
        class: Oro\Bundle\FormBundle\Autocomplete\SearchHandler
        abstract: true
        calls:
            - [initSearchIndexer, ['@oro_search.index', '@oro_search.provider.search_mapping']]
            - [initDoctrinePropertiesByManagerRegistry, ['@doctrine']]
            - [setAclHelper,['@oro_security.acl_helper']]
            - [setLogger,['@logger']]
            - [setPropertyAccessor, ['@property_accessor']]

    oro_form.autocomplete.full_name.search_handler:
        class: Oro\Bundle\FormBundle\Autocomplete\FullNameSearchHandler
        abstract: true
        parent: oro_form.autocomplete.search_handler
        calls:
            - [ setEntityNameResolver, ['@oro_entity.entity_name_resolver'] ]
