diff --git a/src/Service/ImportResourcesService.php b/src/Service/ImportResourcesService.php index a4389503..36364660 100644 --- a/src/Service/ImportResourcesService.php +++ b/src/Service/ImportResourcesService.php @@ -463,41 +463,6 @@ public function importApplication(array $application, array $configuration): ?Ob }//end importApplication() - /** - * @param array $component The component that is being imported - * @param array $configuration The configuration array - * - * @return ObjectEntity|null - */ - public function importComponent(array $component, array $configuration): ?ObjectEntity - { - // Do we have a source? - $source = $this->resourceService->getSource($configuration['githubSource'], 'open-catalogi/open-catalogi-bundle'); - $componentSchema = $this->resourceService->getSchema($configuration['componentSchema'], 'open-catalogi/open-catalogi-bundle'); - $componentMapping = $this->resourceService->getMapping($configuration['componentMapping'], 'open-catalogi/open-catalogi-bundle'); - - if ($source === null - || $componentSchema === null - || $componentMapping === null - ) { - return null; - } - - $synchronization = $this->syncService->findSyncBySource($source, $componentSchema, $component['id']); - - $this->pluginLogger->debug('Mapping object'.$component['login'], ['plugin' => 'open-catalogi/open-catalogi-bundle']); - $this->pluginLogger->debug('The mapping object '.$componentMapping, ['plugin' => 'open-catalogi/open-catalogi-bundle']); - - $this->pluginLogger->debug('Checking organisation '.$component['login'], ['plugin' => 'open-catalogi/open-catalogi-bundle']); - $synchronization->setMapping($componentMapping); - $synchronization = $this->syncService->synchronize($synchronization, $component); - $this->pluginLogger->debug('Organisation synchronization created with id: '.$synchronization->getId()->toString(), ['plugin' => 'open-catalogi/open-catalogi-bundle']); - - return $synchronization->getObject(); - - }//end importComponent() - - /** * @param array $organisation The organization that is being imported * @param array $configuration The configuration array