services:
    marmelab.ng_admin_generator.configuration_generator:
        class: marmelab\NgAdminGeneratorBundle\Generator\ConfigurationGenerator
        arguments:
            -   # Transformers: be careful, order matters!
                - @marmelab.ng_admin_generator.transformer.class_name_to_ngadmin_configuration
                - @marmelab.ng_admin_generator.transformer.ngadmin_config_with_relationships
                - @marmelab.ng_admin_generator.transformer.entity_to_entity_with_icon
            - @doctrine.orm.entity_manager
            - @twig

    # Transformers
    marmelab.ng_admin_generator.transformer.class_name_to_ngadmin_configuration:
        class: marmelab\NgAdminGeneratorBundle\Transformer\ClassNameToNgAdminConfigurationTransformer
        public: false
        arguments:
            - @jms_serializer
            - @jms_serializer.naming_strategy

    marmelab.ng_admin_generator.transformer.ngadmin_config_with_relationships:
        class: marmelab\NgAdminGeneratorBundle\Transformer\NgAdminWithRelationshipsTransformer
        public: false
        arguments:
            - @doctrine.orm.entity_manager
            - @marmelab.nb_admin_generator.guesser.reference_field

    marmelab.ng_admin_generator.transformer.entity_to_entity_with_icon:
        class: marmelab\NgAdminGeneratorBundle\Transformer\EntityToEntityWithIconTransformer
        public: false
        arguments:
            - %ng_admin_generator.icons%

    # Guessers
    marmelab.nb_admin_generator.guesser.reference_field:
        class: marmelab\NgAdminGeneratorBundle\Guesser\ReferencedFieldGuesser
        public: false
        arguments:
            - @jms_serializer
            - %ng_admin_generator.best_referenced_field_choices%
