diff --git a/Classes/Domain/Import/Entity/TouristAttraction.php b/Classes/Domain/Import/Entity/TouristAttraction.php
index d9dece1..dfd174e 100644
--- a/Classes/Domain/Import/Entity/TouristAttraction.php
+++ b/Classes/Domain/Import/Entity/TouristAttraction.php
@@ -90,6 +90,11 @@ class TouristAttraction extends Place implements MapsToType
*/
protected $publicAccess = '';
+ /**
+ * @var string[]
+ */
+ protected $availableLanguages = [];
+
public function getSlogan(): string
{
return $this->slogan;
@@ -179,6 +184,14 @@ class TouristAttraction extends Place implements MapsToType
return $this->publicAccess;
}
+ /**
+ * @return string[]
+ */
+ public function getAvailableLanguages(): array
+ {
+ return $this->availableLanguages;
+ }
+
/**
* @internal for mapping via Symfony component.
*/
@@ -339,6 +352,21 @@ class TouristAttraction extends Place implements MapsToType
$this->publicAccess = $publicAccess;
}
+ /**
+ * @internal for mapping via Symfony component.
+ * @param string|array $availableLanguage
+ */
+ public function setAvailableLanguage($availableLanguage): void
+ {
+ if (is_string($availableLanguage)) {
+ $availableLanguage = [$availableLanguage];
+ }
+
+ $this->availableLanguages = array_map(function (string $availableLanguage) {
+ return str_replace('thuecat:', '', $availableLanguage);
+ }, $availableLanguage);
+ }
+
public static function getSupportedTypes(): array
{
return [
diff --git a/Classes/Domain/Import/Typo3Converter/TouristAttraction.php b/Classes/Domain/Import/Typo3Converter/TouristAttraction.php
index 56ad276..8a81181 100644
--- a/Classes/Domain/Import/Typo3Converter/TouristAttraction.php
+++ b/Classes/Domain/Import/Typo3Converter/TouristAttraction.php
@@ -126,6 +126,7 @@ class TouristAttraction implements Converter
'pets_allowed' => $entity->getPetsAllowed(),
'is_accessible_for_free' => $entity->getIsAccessibleForFree(),
'public_access' => $entity->getPublicAccess(),
+ 'available_languages' => implode(',', $entity->getAvailableLanguages()),
]
);
}
diff --git a/Configuration/TCA/tx_thuecat_tourist_attraction.php b/Configuration/TCA/tx_thuecat_tourist_attraction.php
index 2233f63..906671b 100644
--- a/Configuration/TCA/tx_thuecat_tourist_attraction.php
+++ b/Configuration/TCA/tx_thuecat_tourist_attraction.php
@@ -181,6 +181,14 @@ return (static function (string $extensionKey, string $tableName) {
'readOnly' => true,
],
],
+ 'available_languages' => [
+ 'label' => $languagePath . '.available_languages',
+ 'l10n_mode' => 'prefixLangTitle',
+ 'config' => [
+ 'type' => 'input',
+ 'readOnly' => true,
+ ],
+ ],
'opening_hours' => [
'label' => $languagePath . '.opening_hours',
'l10n_mode' => 'exclude',
@@ -264,7 +272,7 @@ return (static function (string $extensionKey, string $tableName) {
],
'types' => [
'0' => [
- 'showitem' => '--palette--;;language, title, description, slogan, start_of_construction, sanitation, other_service, museum_service, architectural_style, traffic_infrastructure, payment_accepted, digital_offer, photography, pets_allowed, is_accessible_for_free, public_access, opening_hours, offers, address, media, remote_id, --div--;' . $languagePath . '.tab.relations, town, managed_by',
+ 'showitem' => '--palette--;;language, title, description, slogan, start_of_construction, sanitation, other_service, museum_service, architectural_style, traffic_infrastructure, payment_accepted, digital_offer, photography, pets_allowed, is_accessible_for_free, public_access, available_languages, opening_hours, offers, address, media, remote_id, --div--;' . $languagePath . '.tab.relations, town, managed_by',
],
],
];
diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf
index 2a31852..eede20c 100644
--- a/Resources/Private/Language/de.locallang.xlf
+++ b/Resources/Private/Language/de.locallang.xlf
@@ -352,6 +352,19 @@
Public Access
öffentlich zugänglich
+
+
+ German
+ Deutsch
+
+
+ English
+ Englisch
+
+
+ French
+ Französisch
+