diff --git a/Classes/Domain/Import/Entity/Organisation.php b/Classes/Domain/Import/Entity/Organisation.php new file mode 100644 index 0000000..f12d571 --- /dev/null +++ b/Classes/Domain/Import/Entity/Organisation.php @@ -0,0 +1,34 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +namespace WerkraumMedia\ThueCat\Domain\Import\Entity; + +class Organisation extends Minimum implements MapsToType +{ + public static function getSupportedTypes(): array + { + return [ + 'ttgds:Organization', + ]; + } +} diff --git a/Classes/Domain/Import/Entity/TouristMarketingCompany.php b/Classes/Domain/Import/Entity/TouristMarketingCompany.php index 3e65123..084b5d4 100644 --- a/Classes/Domain/Import/Entity/TouristMarketingCompany.php +++ b/Classes/Domain/Import/Entity/TouristMarketingCompany.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace WerkraumMedia\ThueCat\Domain\Import\Entity; -class TouristMarketingCompany extends Minimum implements MapsToType +class TouristMarketingCompany extends Organisation { public static function getSupportedTypes(): array { @@ -31,4 +31,12 @@ class TouristMarketingCompany extends Minimum implements MapsToType 'thuecat:TouristMarketingCompany', ]; } + + /** + * Higher then default 10, as this is also an ttgds:Organization and Organisation would conflict in priority. + */ + public static function getPriority(): int + { + return 20; + } } diff --git a/Classes/Domain/Import/Typo3Converter/GeneralConverter.php b/Classes/Domain/Import/Typo3Converter/GeneralConverter.php index e9a3ac8..4a2cf59 100644 --- a/Classes/Domain/Import/Typo3Converter/GeneralConverter.php +++ b/Classes/Domain/Import/Typo3Converter/GeneralConverter.php @@ -31,6 +31,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Entity\Base; use WerkraumMedia\ThueCat\Domain\Import\Entity\MapsToType; use WerkraumMedia\ThueCat\Domain\Import\Entity\MediaObject; use WerkraumMedia\ThueCat\Domain\Import\Entity\Minimum; +use WerkraumMedia\ThueCat\Domain\Import\Entity\Organisation; use WerkraumMedia\ThueCat\Domain\Import\Entity\ParkingFacility; use WerkraumMedia\ThueCat\Domain\Import\Entity\Place; use WerkraumMedia\ThueCat\Domain\Import\Entity\Properties\ForeignReference; @@ -96,6 +97,7 @@ class GeneralConverter implements Converter, LoggerAwareInterface Town::class => 'tx_thuecat_town', TouristInformation::class => 'tx_thuecat_tourist_information', TouristMarketingCompany::class => 'tx_thuecat_organisation', + Organisation::class => 'tx_thuecat_organisation', ]; public function __construct( diff --git a/Documentation/Changelog/1.3.1.rst b/Documentation/Changelog/1.3.1.rst new file mode 100644 index 0000000..62f87db --- /dev/null +++ b/Documentation/Changelog/1.3.1.rst @@ -0,0 +1,30 @@ +1.3.1 +===== + +Breaking +-------- + +Nothing + +Features +-------- + +Nothing + +Fixes +----- + +* Allow to import objects (e.g. Tourist Attractions) which are managed by generic + organisations instead of specific Tourist Marketing Company. + Those organisations will now also be imported, just like Tourist Marketing Company before. + Both are organizations internally and only used for the TYPO3 backend module. + +Tasks +----- + +Nothing +Deprecation +----------- + +Nothing + diff --git a/ext_emconf.php b/ext_emconf.php index e95ae0e..f3a836a 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -11,7 +11,7 @@ $EM_CONF[$_EXTKEY] = [ 'author' => 'Daniel Siepmann', 'author_email' => 'coding@daniel-siepmann.de', 'author_company' => '', - 'version' => '1.3.0', + 'version' => '1.3.1', 'constraints' => [ 'depends' => [ 'core' => '',