Add rest mode to destination data import

This commit is contained in:
Dirk 2020-02-19 09:08:15 +01:00
parent c150158a17
commit d299990765
5 changed files with 12 additions and 4 deletions

View file

@ -42,6 +42,10 @@ class DestinationDataImportService {
* @var * @var
*/ */
protected $restLimit; protected $restLimit;
/**
* @var
*/
protected $restMode;
/** /**
* @var * @var
*/ */
@ -189,6 +193,7 @@ class DestinationDataImportService {
$this->restLicenseKey = $this->settings['destinationData']['license']; $this->restLicenseKey = $this->settings['destinationData']['license'];
$this->restType = $this->settings['destinationData']['restType']; $this->restType = $this->settings['destinationData']['restType'];
$this->restLimit = $this->settings['destinationData']['restLimit']; $this->restLimit = $this->settings['destinationData']['restLimit'];
$this->restMode = $this->settings['destinationData']['restMode'];
$this->restTemplate = $this->settings['destinationData']['restTemplate']; $this->restTemplate = $this->settings['destinationData']['restTemplate'];
$this->sysCategoriesPid = $this->settings['destinationData']['categoriesPid']; $this->sysCategoriesPid = $this->settings['destinationData']['categoriesPid'];
$this->categoryParentUid = $this->settings['destinationData']['categoryParentUid']; $this->categoryParentUid = $this->settings['destinationData']['categoryParentUid'];
@ -224,7 +229,7 @@ class DestinationDataImportService {
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Starting Destination Data Import Service'); $this->logger->info('Starting Destination Data Import Service');
$restUrl = $this->restUrl . '?experience=' . $this->restExperience . '&licensekey=' . $this->restLicenseKey . '&type=' . $this->restType . '&limit=' . $this->restLimit . '&template=' . $this->restTemplate; $restUrl = $this->restUrl . '?experience=' . $this->restExperience . '&licensekey=' . $this->restLicenseKey . '&type=' . $this->restType . '&mode=' . $this->restMode . '&limit=' . $this->restLimit . '&template=' . $this->restTemplate;
$this->logger->info('Try to get data from ' . $restUrl); $this->logger->info('Try to get data from ' . $restUrl);
if ($jsonResponse = json_decode(file_get_contents($restUrl),true)) { if ($jsonResponse = json_decode(file_get_contents($restUrl),true)) {

View file

@ -24,6 +24,8 @@ plugin.tx_events {
restType = Event restType = Event
# cat=plugin.tx_events//a; type=string; label=Data Limit # cat=plugin.tx_events//a; type=string; label=Data Limit
restLimit = 200 restLimit = 200
# cat=plugin.tx_events//a; type=string; label=Mode
restMode = next_months,12
# cat=plugin.tx_events//a; type=string; label=Data Template # cat=plugin.tx_events//a; type=string; label=Data Template
restTemplate = ET2014A.json restTemplate = ET2014A.json
# cat=plugin.tx_events//a; type=string; Label=Category Storage # cat=plugin.tx_events//a; type=string; Label=Category Storage

View file

@ -51,6 +51,7 @@ plugin.tx_events {
license = {$plugin.tx_events.settings.destinationData.license} license = {$plugin.tx_events.settings.destinationData.license}
restType = {$plugin.tx_events.settings.destinationData.restType} restType = {$plugin.tx_events.settings.destinationData.restType}
restLimit = {$plugin.tx_events.settings.destinationData.restLimit} restLimit = {$plugin.tx_events.settings.destinationData.restLimit}
restMode = {$plugin.tx_events.settings.destinationData.restMode}
restTemplate = {$plugin.tx_events.settings.destinationData.restTemplate} restTemplate = {$plugin.tx_events.settings.destinationData.restTemplate}
categoriesPid = {$plugin.tx_events.settings.destinationData.categoriesPid} categoriesPid = {$plugin.tx_events.settings.destinationData.categoriesPid}
categoryParentUid = {$plugin.tx_events.settings.destinationData.categoryParentUid} categoryParentUid = {$plugin.tx_events.settings.destinationData.categoryParentUid}
@ -58,4 +59,4 @@ plugin.tx_events {
} }
} }
module.tx_events < plugin.tx_events module.tx_events < plugin.tx_events

View file

@ -49,4 +49,4 @@
</f:for> </f:for>
</f:widget.paginate> </f:widget.paginate>
</html> </html>

View file

@ -72,4 +72,4 @@
</div> </div>
</div> </div>
</f:section> </f:section>
</html> </html>