services:
    oro_action.action_locator:
        class: Symfony\Component\DependencyInjection\ServiceLocator
        public: false
        arguments:
            - [] # actions
        tags:
            - { name: container.service_locator }

    oro_action.action_factory:
        class: 'Oro\Component\Action\Action\ActionFactory'
        arguments:
            - '@oro_action.action_locator'
            - []

    oro_action.action_assembler:
        class: 'Oro\Component\Action\Action\ActionAssembler'
        arguments:
            - '@oro_action.action_factory'
            - '@oro_action.expression.factory'
        calls:
            - [addConfigurationPass, ['@oro_action.configuration_pass.replace_property_path']]

    oro_action.action.tree:
        class: 'Oro\Component\Action\Action\TreeExecutor'
        arguments:
            - "@?logger"
        tags:
            - { name: oro_action.action, alias: tree }
            - { name: monolog.logger, channel: oro_action }

    oro_action.action.configurable:
        class: 'Oro\Component\Action\Action\Configurable'
        arguments:
            - '@oro_action.action_assembler'
        tags:
            - { name: oro_action.action, alias: configurable }

    oro_action.action.duplicate_entity:
        class: 'Oro\Bundle\ActionBundle\Action\DuplicateEntity'
        arguments:
            - '@oro_action.expression.context_accessor'
        calls:
          - [setDuplicatorFactory, ['@oro_action.factory.duplicator_factory']]
        tags:
            - { name: oro_action.action, alias: duplicate|duplicate_entity }

    oro_action.action.resolve_destination_page:
        class: 'Oro\Bundle\ActionBundle\Action\ResolveDestinationPage'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@oro_action.resolver.destination_page_resolver'
            - '@request_stack'
        tags:
            - { name: oro_action.action, alias: resolve_destination_page }

    oro_action.action.create_datetime:
        class: 'Oro\Component\Action\Action\CreateDateTime'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: create_datetime }

    oro_action.action.call_method:
        class: 'Oro\Component\Action\Action\CallMethod'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: call_method }

    oro_action.action.assign_value:
        class: 'Oro\Component\Action\Action\AssignValue'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: assign_value }

    oro_action.action.copy_values:
        class: 'Oro\Component\Action\Action\CopyValues'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: copy_values }

    oro_action.action.unset_value:
        class: 'Oro\Component\Action\Action\UnsetValue'
        arguments:
            - '@oro_action.action.assign_value'
        tags:
            - { name: oro_action.action, alias: unset_value }

    oro_action.action.create_object:
        class: 'Oro\Component\Action\Action\CreateObject'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: create_object }

    oro_action.action.create_date:
        class: 'Oro\Bundle\ActionBundle\Action\CreateDate'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@oro_locale.settings'
        tags:
            - { name: oro_action.action, alias: create_date }

    oro_action.action.create_entity:
        class: 'Oro\Component\Action\Action\CreateEntity'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@doctrine'
        tags:
            - { name: oro_action.action, alias: create_entity }

    oro_action.action.flush_entity:
        class: 'Oro\Component\Action\Action\FlushEntity'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@doctrine'
        tags:
            - { name: oro_action.action, alias: flush_entity }

    oro_action.action.request_entity:
        class: 'Oro\Component\Action\Action\RequestEntity'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@doctrine'
        tags:
            - { name: oro_action.action, alias: request_entity|find_entity }

    oro_action.action.get_class_name:
        class: 'Oro\Component\Action\Action\GetClassName'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: get_class_name }

    oro_action.action.redirect:
        class: 'Oro\Component\Action\Action\Redirect'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@router'
            - 'redirectUrl'
        tags:
            - { name: oro_action.action, alias: redirect }

    oro_action.action.format_string:
        class: 'Oro\Component\Action\Action\FormatString'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: format_string }

    oro_action.action.assign_active_user:
        class: 'Oro\Component\Action\Action\AssignActiveUser'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@security.token_storage'
        tags:
            - { name: oro_action.action, alias: assign_active_user|get_active_user }

    oro_action.action.format_name:
        class: 'Oro\Bundle\ActionBundle\Action\FormatName'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@oro_entity.entity_name_resolver'
        tags:
            - { name: oro_action.action, alias: format_name }

    oro_action.action.traverse:
        class: 'Oro\Component\Action\Action\Traverse'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@oro_action.action.configurable'
        tags:
            - { name: oro_action.action, alias: traverse|foreach }

    oro_action.action.translate:
        class: 'Oro\Component\Action\Action\TranslateAction'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@translator'
        tags:
            - { name: oro_action.action, alias: translate|trans }

    oro_action.action.flash_message:
        class: 'Oro\Component\Action\Action\FlashMessage'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@translator'
            - '@oro_ui.html_tag_helper'
            - '@request_stack'
        tags:
            - { name: oro_action.action, alias: flash_message }

    oro_action.action.remove_entity:
        class: 'Oro\Component\Action\Action\RemoveEntity'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@doctrine'
        tags:
            - { name: oro_action.action, alias: remove_entity }

    oro_action.action.assign_constant_value:
        class: 'Oro\Component\Action\Action\AssignConstantValue'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: assign_constant_value }

    oro_action.action.call_service_method:
        class: 'Oro\Component\Action\Action\CallServiceMethod'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@service_container'
        tags:
            - { name: oro_action.action, alias: call_service_method }

    oro_action.action.refresh_grid:
        class: 'Oro\Component\Action\Action\RefreshGrid'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: refresh_grid }

    Oro\Bundle\ActionBundle\Action\RunActionGroup:
        alias: oro_action.action.run_action_group

    oro_action.action.run_action_group:
        class: 'Oro\Bundle\ActionBundle\Action\RunActionGroup'
        arguments:
            - '@oro_action.action_group_registry'
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: run_action_group }

    oro_action.action.find_entities:
        class: 'Oro\Component\Action\Action\FindEntities'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@doctrine'
        tags:
            - { name: oro_action.action, alias: find_entities }

    oro_action.action.assign_url:
        class: 'Oro\Component\Action\Action\AssignUrl'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@router'
        tags:
            - { name: oro_action.action, alias: assign_url }

    oro_action.action.count:
        class: 'Oro\Component\Action\Action\Count'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: count }

    oro_action.action.clone_object:
        class: 'Oro\Component\Action\Action\CloneObject'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: clone_object }

    oro_action.action.clone_entity:
        class: 'Oro\Component\Action\Action\CloneEntity'
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@doctrine'
            - '@translator'
            - '@session.flash_bag'
            - '@logger'
        tags:
            - { name: oro_action.action, alias: clone_entity }

    oro_action.action.extendable:
        class: 'Oro\Component\Action\Action\ExtendableAction'
        arguments:
            - '@oro_action.expression.context_accessor'
        calls:
            - [setDispatcher, ['@event_dispatcher']]
        tags:
            - { name: oro_action.action, alias: extendable }

    oro_action.action.increase_value:
        class: 'Oro\Component\Action\Action\IncreaseValue'
        arguments:
            - '@oro_action.expression.context_accessor'
        calls:
            - [setDispatcher, ['@event_dispatcher']]
        tags:
            - { name: oro_action.action, alias: increase_value }

    oro_action.action.substring:
        class: 'Oro\Component\Action\Action\Substring'
        arguments:
            - '@oro_action.expression.context_accessor'
        tags:
            - { name: oro_action.action, alias: substring }

    oro_action.action.render_template:
        class: Oro\Component\Action\Action\RenderTemplate
        arguments:
            - '@oro_action.expression.context_accessor'
            - '@twig'
        tags:
            - { name: oro_action.action, alias: render_template }
