From 710953974d0ec9dab1629fc8f8dc68c68394c40e Mon Sep 17 00:00:00 2001 From: Gyvastis Date: Thu, 16 Sep 2021 10:21:50 +0200 Subject: [PATCH] add sf document classes as param --- src/DependencyInjection/SalesforceMapperExtension.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DependencyInjection/SalesforceMapperExtension.php b/src/DependencyInjection/SalesforceMapperExtension.php index 836a052..7a7b7f3 100644 --- a/src/DependencyInjection/SalesforceMapperExtension.php +++ b/src/DependencyInjection/SalesforceMapperExtension.php @@ -2,6 +2,7 @@ namespace PhpArsenal\SalesforceMapperBundle\DependencyInjection; +use PhpArsenal\SalesforceMapperBundle\Builder\SalesforceDocumentClassTreeBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader; @@ -38,6 +39,10 @@ public function load(array $configs, ContainerBuilder $container) $yamlLoader->load('param_converter.yml'); $container->setParameter('salesforce_mapper.param_converter', $config['param_converter']); + + /** @var SalesforceDocumentClassTreeBuilder $sfDocumentClassTreeBuilder */ + $sfDocumentClassTreeBuilder = $container->get(SalesforceDocumentClassTreeBuilder::class); + $container->setParameter('salesforce_mapper.document_classes', $sfDocumentClassTreeBuilder->build()); } }