private function getObjectFactoryDefinition(array $config)
    {
        if ($config['object_factory']['use_default_value']) {
            $class = DefaultValueObjectFactory::class;
            $args = [new Reference('fxp_default_value.factory')];
        } else {
            $class = DoctrineObjectFactory::class;
            $args = [new Reference('doctrine.orm.entity_manager')];
        }

        return new Definition($class, $args);
    }