mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-24 04:36:11 +01:00
Add source while importing from Destination Data One (#37)
Destination Data One provides an source info explaining where the data originally came from. This is now added to event records and exposed in TYPO3 backend. That allows editors to check the source and contact corresponding sources in order to fix broken data. Relates: #10630
This commit is contained in:
parent
3d0d5d8645
commit
5af1d08148
10 changed files with 362 additions and 10 deletions
|
@ -140,6 +140,16 @@ class Event extends AbstractEntity
|
||||||
*/
|
*/
|
||||||
protected $dataProcessing;
|
protected $dataProcessing;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $sourceName = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $sourceUrl = '';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->initStorageObjects();
|
$this->initStorageObjects();
|
||||||
|
@ -469,4 +479,14 @@ class Event extends AbstractEntity
|
||||||
{
|
{
|
||||||
return $this->_localizedUid;
|
return $this->_localizedUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSourceName(string $name): void
|
||||||
|
{
|
||||||
|
$this->sourceName = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSourceUrl(string $url): void
|
||||||
|
{
|
||||||
|
$this->sourceUrl = $url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,6 +277,10 @@ class DestinationDataImportService
|
||||||
$this->setAssets($event['media_objects']);
|
$this->setAssets($event['media_objects']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($event['source'] ?? false) {
|
||||||
|
$this->setSource($event['source']);
|
||||||
|
}
|
||||||
|
|
||||||
$this->eventDispatcher->dispatch(new EventImportEvent(
|
$this->eventDispatcher->dispatch(new EventImportEvent(
|
||||||
$existingEvent,
|
$existingEvent,
|
||||||
$this->tmpCurrentEvent
|
$this->tmpCurrentEvent
|
||||||
|
@ -488,6 +492,17 @@ class DestinationDataImportService
|
||||||
$this->tmpCurrentEvent->setImages($images);
|
$this->tmpCurrentEvent->setImages($images);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function setSource(array $source): void
|
||||||
|
{
|
||||||
|
if (isset($source['value'])) {
|
||||||
|
$this->tmpCurrentEvent->setSourceName($source['value']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($source['url'])) {
|
||||||
|
$this->tmpCurrentEvent->setSourceUrl($source['url']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the boolean value for requested attribute.
|
* Fetch the boolean value for requested attribute.
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,7 +28,7 @@ return [
|
||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => [
|
'1' => [
|
||||||
'showitem' => '--palette--;' . $l10nPathFE . ':palette.general;general,
|
'showitem' => '
|
||||||
sys_language_uid,
|
sys_language_uid,
|
||||||
l10n_parent,
|
l10n_parent,
|
||||||
l10n_diffsource,
|
l10n_diffsource,
|
||||||
|
@ -40,6 +40,7 @@ return [
|
||||||
slug,
|
slug,
|
||||||
ticket,
|
ticket,
|
||||||
global_id,
|
global_id,
|
||||||
|
--palette--;;source,
|
||||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.text,
|
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.text,
|
||||||
details,
|
details,
|
||||||
price_info,
|
price_info,
|
||||||
|
@ -67,7 +68,12 @@ return [
|
||||||
endtime',
|
endtime',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'palettes' => [
|
||||||
|
'source' => [
|
||||||
|
'label' => $l10nPath . ':tx_events_domain_model_event.palette.source',
|
||||||
|
'showitem' => 'source_name, source_url',
|
||||||
|
],
|
||||||
|
],
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'sys_language_uid' => [
|
'sys_language_uid' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
|
@ -187,6 +193,24 @@ return [
|
||||||
'eval' => 'trim',
|
'eval' => 'trim',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'source_name' => [
|
||||||
|
'exclude' => true,
|
||||||
|
'label' => $l10nPath . ':tx_events_domain_model_event.source_name',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'readOnly' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'source_url' => [
|
||||||
|
'exclude' => true,
|
||||||
|
'label' => $l10nPath . ':tx_events_domain_model_event.source_url',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'renderType' => 'inputLink',
|
||||||
|
'softref' => 'typolink',
|
||||||
|
'readOnly' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
'slug' => [
|
'slug' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'label' => $l10nPath . ':tx_events_domain_model_event.slug',
|
'label' => $l10nPath . ':tx_events_domain_model_event.slug',
|
||||||
|
|
|
@ -18,6 +18,11 @@ Features
|
||||||
|
|
||||||
* Allow to modify an event object before importing.
|
* Allow to modify an event object before importing.
|
||||||
|
|
||||||
|
* Add source to events.
|
||||||
|
Destination Data One provides the original source, either them self or an external.
|
||||||
|
This is now saved in order to make it easier for editors and companies to contact
|
||||||
|
the original source and ask to fix broken data.
|
||||||
|
|
||||||
Fixes
|
Fixes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
<source>Social Media</source>
|
<source>Social Media</source>
|
||||||
<target>Social Media</target>
|
<target>Social Media</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.palette.source">
|
||||||
|
<source>Source</source>
|
||||||
|
<target>Quelle</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_event">
|
<trans-unit id="tx_events_domain_model_event">
|
||||||
<source>Event</source>
|
<source>Event</source>
|
||||||
<target>Veranstaltung</target>
|
<target>Veranstaltung</target>
|
||||||
|
@ -51,6 +55,14 @@
|
||||||
<source>Global UID</source>
|
<source>Global UID</source>
|
||||||
<target>Globale UID</target>
|
<target>Globale UID</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.source_name">
|
||||||
|
<source>Source Name</source>
|
||||||
|
<target>Name der Quelle</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.source_url">
|
||||||
|
<source>Source URL</source>
|
||||||
|
<target>URL der Quelle</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_event.slug">
|
<trans-unit id="tx_events_domain_model_event.slug">
|
||||||
<source>Slug</source>
|
<source>Slug</source>
|
||||||
<target>URL-Segment</target>
|
<target>URL-Segment</target>
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
<trans-unit id="tx_events_domain_model_event.tabs.social">
|
<trans-unit id="tx_events_domain_model_event.tabs.social">
|
||||||
<source>Social Media</source>
|
<source>Social Media</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.palette.source">
|
||||||
|
<source>Source</source>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_event.title">
|
<trans-unit id="tx_events_domain_model_event.title">
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
@ -39,6 +42,12 @@
|
||||||
<trans-unit id="tx_events_domain_model_event.global_id">
|
<trans-unit id="tx_events_domain_model_event.global_id">
|
||||||
<source>Global UID</source>
|
<source>Global UID</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.source_name">
|
||||||
|
<source>Source Name</source>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.source_url">
|
||||||
|
<source>Source URL</source>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_event.slug">
|
<trans-unit id="tx_events_domain_model_event.slug">
|
||||||
<source>Slug</source>
|
<source>Slug</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'tx_events_domain_model_event' => [
|
||||||
|
[
|
||||||
|
'uid' => 1,
|
||||||
|
'global_id' => 'e_100347853',
|
||||||
|
'source_name' => 'destination.one',
|
||||||
|
'source_url' => 'http://destination.one/',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'uid' => 2,
|
||||||
|
'global_id' => 'e_100347854',
|
||||||
|
'source_name' => 'Foreign Example 1',
|
||||||
|
'source_url' => 'https://example.com',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'uid' => 3,
|
||||||
|
'global_id' => 'e_100347855',
|
||||||
|
'source_name' => 'Foreign Example 2',
|
||||||
|
'source_url' => 'https://example.com/something-else',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
|
@ -0,0 +1,219 @@
|
||||||
|
{
|
||||||
|
"status": "OK",
|
||||||
|
"count": 3,
|
||||||
|
"overallcount": 50,
|
||||||
|
"channels": [],
|
||||||
|
"facetGroups": [],
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"global_id": "e_100347853",
|
||||||
|
"id": "100347853",
|
||||||
|
"title": "Allerlei Weihnachtliches (Heute mit Johannes Geißer)",
|
||||||
|
"type": "Event",
|
||||||
|
"categories": [
|
||||||
|
],
|
||||||
|
"texts": [
|
||||||
|
{
|
||||||
|
"rel": "details",
|
||||||
|
"type": "text/html",
|
||||||
|
"value": "Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.<br>Eintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)<br>Um Voranmeldung unter 03672-486470 oder <a data-cke-saved-href=\"mailto:schillerhaus@rudolstadt.de\" href=\"mailto:schillerhaus@rudolstadt.de\">schillerhaus@rudolstadt.de</a> wird gebeten. <br><strong>Es gilt die 2G-PLUS-Regel.</strong> <br>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "details",
|
||||||
|
"type": "text/plain",
|
||||||
|
"value": "Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.\nEintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)\nUm Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten.\nEs gilt die 2G-PLUS-Regel."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "teaser",
|
||||||
|
"type": "text/html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "teaser",
|
||||||
|
"type": "text/plain"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"country": "Deutschland",
|
||||||
|
"areas": [
|
||||||
|
"Rudolstadt und Umgebung"
|
||||||
|
],
|
||||||
|
"city": "Rudolstadt",
|
||||||
|
"zip": "07407",
|
||||||
|
"street": "Schillerstraße 25",
|
||||||
|
"phone": "+ 49 3672 / 486470",
|
||||||
|
"fax": "+ 49 3672 / 486475",
|
||||||
|
"web": "http://www.schillerhaus.rudolstadt.de/",
|
||||||
|
"email": "schillerhaus@rudolstadt.de",
|
||||||
|
"author": "support@hubermedia.de",
|
||||||
|
"media_objects": [
|
||||||
|
],
|
||||||
|
"keywords": [],
|
||||||
|
"timeIntervals": [
|
||||||
|
{
|
||||||
|
"weekdays": [],
|
||||||
|
"start": "2099-12-19T15:00:00+01:00",
|
||||||
|
"end": "2099-12-19T16:30:00+01:00",
|
||||||
|
"tz": "Europe/Berlin",
|
||||||
|
"interval": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Schillerhaus Rudolstadt",
|
||||||
|
"features": [
|
||||||
|
],
|
||||||
|
"addresses": [
|
||||||
|
],
|
||||||
|
"created": "2099-10-31T12:29:00+00:00",
|
||||||
|
"changed": "2099-12-14T08:29:00+00:00",
|
||||||
|
"source": {
|
||||||
|
"url": "http://destination.one/",
|
||||||
|
"value": "destination.one"
|
||||||
|
},
|
||||||
|
"company": "",
|
||||||
|
"district": "",
|
||||||
|
"postoffice": "",
|
||||||
|
"phone2": "",
|
||||||
|
"seasons": [],
|
||||||
|
"subitems": [],
|
||||||
|
"hyperObjects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global_id": "e_100347854",
|
||||||
|
"id": "100347854",
|
||||||
|
"title": "Allerlei Weihnachtliches (Heute mit Johannes Geißer)",
|
||||||
|
"type": "Event",
|
||||||
|
"categories": [
|
||||||
|
],
|
||||||
|
"texts": [
|
||||||
|
{
|
||||||
|
"rel": "details",
|
||||||
|
"type": "text/html",
|
||||||
|
"value": "Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.<br>Eintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)<br>Um Voranmeldung unter 03672-486470 oder <a data-cke-saved-href=\"mailto:schillerhaus@rudolstadt.de\" href=\"mailto:schillerhaus@rudolstadt.de\">schillerhaus@rudolstadt.de</a> wird gebeten. <br><strong>Es gilt die 2G-PLUS-Regel.</strong> <br>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "details",
|
||||||
|
"type": "text/plain",
|
||||||
|
"value": "Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.\nEintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)\nUm Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten.\nEs gilt die 2G-PLUS-Regel."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "teaser",
|
||||||
|
"type": "text/html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "teaser",
|
||||||
|
"type": "text/plain"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"country": "Deutschland",
|
||||||
|
"areas": [
|
||||||
|
"Rudolstadt und Umgebung"
|
||||||
|
],
|
||||||
|
"city": "Rudolstadt",
|
||||||
|
"zip": "07407",
|
||||||
|
"street": "Schillerstraße 25",
|
||||||
|
"phone": "+ 49 3672 / 486470",
|
||||||
|
"fax": "+ 49 3672 / 486475",
|
||||||
|
"web": "http://www.schillerhaus.rudolstadt.de/",
|
||||||
|
"email": "schillerhaus@rudolstadt.de",
|
||||||
|
"author": "support@hubermedia.de",
|
||||||
|
"media_objects": [
|
||||||
|
],
|
||||||
|
"keywords": [],
|
||||||
|
"timeIntervals": [
|
||||||
|
{
|
||||||
|
"weekdays": [],
|
||||||
|
"start": "2099-12-19T15:00:00+01:00",
|
||||||
|
"end": "2099-12-19T16:30:00+01:00",
|
||||||
|
"tz": "Europe/Berlin",
|
||||||
|
"interval": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Schillerhaus Rudolstadt",
|
||||||
|
"features": [
|
||||||
|
],
|
||||||
|
"addresses": [
|
||||||
|
],
|
||||||
|
"created": "2099-10-31T12:29:00+00:00",
|
||||||
|
"changed": "2099-12-14T08:29:00+00:00",
|
||||||
|
"source": {
|
||||||
|
"url": "https://example.com",
|
||||||
|
"value": "Foreign Example 1"
|
||||||
|
},
|
||||||
|
"company": "",
|
||||||
|
"district": "",
|
||||||
|
"postoffice": "",
|
||||||
|
"phone2": "",
|
||||||
|
"seasons": [],
|
||||||
|
"subitems": [],
|
||||||
|
"hyperObjects": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"global_id": "e_100347855",
|
||||||
|
"id": "100347855",
|
||||||
|
"title": "Allerlei Weihnachtliches (Heute mit Johannes Geißer)",
|
||||||
|
"type": "Event",
|
||||||
|
"categories": [
|
||||||
|
],
|
||||||
|
"texts": [
|
||||||
|
{
|
||||||
|
"rel": "details",
|
||||||
|
"type": "text/html",
|
||||||
|
"value": "Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.<br>Eintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)<br>Um Voranmeldung unter 03672-486470 oder <a data-cke-saved-href=\"mailto:schillerhaus@rudolstadt.de\" href=\"mailto:schillerhaus@rudolstadt.de\">schillerhaus@rudolstadt.de</a> wird gebeten. <br><strong>Es gilt die 2G-PLUS-Regel.</strong> <br>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "details",
|
||||||
|
"type": "text/plain",
|
||||||
|
"value": "Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.\nEintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)\nUm Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten.\nEs gilt die 2G-PLUS-Regel."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "teaser",
|
||||||
|
"type": "text/html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rel": "teaser",
|
||||||
|
"type": "text/plain"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"country": "Deutschland",
|
||||||
|
"areas": [
|
||||||
|
"Rudolstadt und Umgebung"
|
||||||
|
],
|
||||||
|
"city": "Rudolstadt",
|
||||||
|
"zip": "07407",
|
||||||
|
"street": "Schillerstraße 25",
|
||||||
|
"phone": "+ 49 3672 / 486470",
|
||||||
|
"fax": "+ 49 3672 / 486475",
|
||||||
|
"web": "http://www.schillerhaus.rudolstadt.de/",
|
||||||
|
"email": "schillerhaus@rudolstadt.de",
|
||||||
|
"author": "support@hubermedia.de",
|
||||||
|
"media_objects": [
|
||||||
|
],
|
||||||
|
"keywords": [],
|
||||||
|
"timeIntervals": [
|
||||||
|
{
|
||||||
|
"weekdays": [],
|
||||||
|
"start": "2099-12-19T15:00:00+01:00",
|
||||||
|
"end": "2099-12-19T16:30:00+01:00",
|
||||||
|
"tz": "Europe/Berlin",
|
||||||
|
"interval": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Schillerhaus Rudolstadt",
|
||||||
|
"features": [
|
||||||
|
],
|
||||||
|
"addresses": [
|
||||||
|
],
|
||||||
|
"created": "2099-10-31T12:29:00+00:00",
|
||||||
|
"changed": "2099-12-14T08:29:00+00:00",
|
||||||
|
"source": {
|
||||||
|
"url": "https://example.com/something-else",
|
||||||
|
"value": "Foreign Example 2"
|
||||||
|
},
|
||||||
|
"company": "",
|
||||||
|
"district": "",
|
||||||
|
"postoffice": "",
|
||||||
|
"phone2": "",
|
||||||
|
"seasons": [],
|
||||||
|
"subitems": [],
|
||||||
|
"hyperObjects": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -10,6 +10,20 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
*/
|
*/
|
||||||
class ImportsExampleAsExpectedTest extends AbstractTest
|
class ImportsExampleAsExpectedTest extends AbstractTest
|
||||||
{
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->setUpConfiguration([
|
||||||
|
'restUrl = https://example.com/some-path/',
|
||||||
|
'license = example-license',
|
||||||
|
'restType = Event',
|
||||||
|
'restLimit = 3',
|
||||||
|
'restMode = next_months,12',
|
||||||
|
'restTemplate = ET2014A.json',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
|
@ -20,14 +34,6 @@ class ImportsExampleAsExpectedTest extends AbstractTest
|
||||||
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/SingleImportConfigurationWithCategories.php');
|
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/SingleImportConfigurationWithCategories.php');
|
||||||
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/SingleRegion.php');
|
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/SingleRegion.php');
|
||||||
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/SingleCategory.php');
|
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/SingleCategory.php');
|
||||||
$this->setUpConfiguration([
|
|
||||||
'restUrl = https://example.com/some-path/',
|
|
||||||
'license = example-license',
|
|
||||||
'restType = Event',
|
|
||||||
'restLimit = 3',
|
|
||||||
'restMode = next_months,12',
|
|
||||||
'restTemplate = ET2014A.json',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$requests = &$this->setUpResponses([
|
$requests = &$this->setUpResponses([
|
||||||
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/Response.json') ?: ''),
|
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/Response.json') ?: ''),
|
||||||
|
@ -72,4 +78,20 @@ class ImportsExampleAsExpectedTest extends AbstractTest
|
||||||
|
|
||||||
$this->assertEmptyLog();
|
$this->assertEmptyLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function importsSource(): void
|
||||||
|
{
|
||||||
|
$this->importPHPDataSet(__DIR__ . '/Fixtures/Database/DefaultImportConfiguration.php');
|
||||||
|
$this->setUpResponses([
|
||||||
|
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithSources.json') ?: ''),
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->executeCommand();
|
||||||
|
|
||||||
|
$this->assertPHPDataSet(__DIR__ . '/Assertions/ImportsSource.php');
|
||||||
|
$this->assertEmptyLog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ CREATE TABLE tx_events_domain_model_event (
|
||||||
partner text,
|
partner text,
|
||||||
region int(11) unsigned DEFAULT '0',
|
region int(11) unsigned DEFAULT '0',
|
||||||
references_events text,
|
references_events text,
|
||||||
|
source_name varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
source_url varchar(255) DEFAULT '' NOT NULL,
|
||||||
KEY dataHandler (l10n_parent, t3ver_oid, deleted, t3ver_wsid, t3ver_state)
|
KEY dataHandler (l10n_parent, t3ver_oid, deleted, t3ver_wsid, t3ver_state)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue