Make Pid of categories configurable

This commit is contained in:
Dirk 2019-08-13 10:10:00 +02:00
parent 7ab18bce50
commit f6a46012a7
3 changed files with 9 additions and 0 deletions

View file

@ -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 {

View file

@ -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
}
}
}

View file

@ -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}
}
}
}