Allow to import things organised by generic organisations (#74)

Not all things are managed by TouristMarketingCompany, some are managed
by generic organisations.
Those are now handled the same way as TouristMarketingCompany are
already handled.

That way those things can also be imported, as they now can import their
manager.
This commit is contained in:
Daniel Siepmann 2022-09-29 14:10:36 +02:00 committed by GitHub
parent 11292c2e18
commit 4a3eb42c73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 2 deletions

View file

@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
/*
* Copyright (C) 2022 Daniel Siepmann <coding@daniel-siepmann.de>
*
* 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',
];
}
}

View file

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

View file

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

View file

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

View file

@ -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' => '',