diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index 58a09f2..7ba84d0 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -52,6 +52,10 @@ class DestinationDataImportService { * @var */ protected $storagePid; + /** + * @var + */ + protected $categoriesPid; /** * @var */ @@ -184,6 +188,7 @@ class DestinationDataImportService { $this->restType = $this->settings['destinationData']['restType']; $this->restLimit = $this->settings['destinationData']['restLimit']; $this->restTemplate = $this->settings['destinationData']['dataTemplate']; + $this->sysCategoriesPid = $this->settings['destinationData']['categoriesPid']; } /** @@ -289,6 +294,7 @@ class DestinationDataImportService { $tmpSysCategory = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Domain\\Model\\Category'); $tmpSysCategory->setTitle($categoryTitle); $tmpSysCategory->setParent($sysParentCategory); + $tmpSysCategory->setPid($this->sysCategoriesPid); $this->sysCategoriesRepository->add($tmpSysCategory); $this->tmpCurrentEvent->addCategory($tmpSysCategory); } else { diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 9fb227e..c6ea1d3 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -24,6 +24,8 @@ plugin.tx_events { dataLimit = 200 # cat=plugin.tx_events//a; type=string; label=Data Template dataTemplate = ET2014A.json + # cat.plugin.tx_events//a; type=string: Label=Category Storage + categoriesPid = 54 } } } diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 0cade83..894abef 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -51,6 +51,7 @@ plugin.tx_events { dataType = {$plugin.tx_events.settings.destinationData.datType} dataLimit = {$plugin.tx_events.settings.destinationData.dataLimit} dataTemplate = {$plugin.tx_events.settings.destinationData.dataTemplate} + categoriesPid = {$plugin.tx_events.settings.destinationData.categoriesPid} } } }