mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-11-16 02:06:12 +01:00
Rework after first review round
This commit is contained in:
parent
d39053b498
commit
dcc9c911ae
62 changed files with 217 additions and 655 deletions
|
@ -27,45 +27,21 @@ use WerkraumMedia\ThueCat\Domain\Import\EntityMapper\PropertyValues;
|
|||
|
||||
class AccessibilityCertification implements MapsToType
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $accessibilityCertificationStatus = '';
|
||||
protected string $accessibilityCertificationStatus = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityDeaf = '';
|
||||
protected string $certificationAccessibilityDeaf = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityMental = '';
|
||||
protected string $certificationAccessibilityMental = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityPartiallyDeaf = '';
|
||||
protected string $certificationAccessibilityPartiallyDeaf = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityPartiallyVisual = '';
|
||||
protected string $certificationAccessibilityPartiallyVisual = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityVisual = '';
|
||||
protected string $certificationAccessibilityVisual = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityWalking = '';
|
||||
protected string $certificationAccessibilityWalking = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $certificationAccessibilityWheelchair = '';
|
||||
protected string $certificationAccessibilityWheelchair = '';
|
||||
|
||||
public function getAccessibilityCertificationStatus(): string
|
||||
{
|
||||
|
|
|
@ -27,45 +27,21 @@ use WerkraumMedia\ThueCat\Domain\Import\EntityMapper\PropertyValues;
|
|||
|
||||
class AccessibilitySpecification implements MapsToType
|
||||
{
|
||||
/**
|
||||
* @var AccessibilityCertification
|
||||
*/
|
||||
protected $accessibilityCertification;
|
||||
protected AccessibilityCertification $accessibilityCertification;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $accessibilitySearchCriteria = [];
|
||||
protected array $accessibilitySearchCriteria = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $shortDescriptionAccessibilityAllGenerations = '';
|
||||
protected string $shortDescriptionAccessibilityAllGenerations = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $shortDescriptionAccessibilityAllergic = '';
|
||||
protected string $shortDescriptionAccessibilityAllergic = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $shortDescriptionAccessibilityDeaf = '';
|
||||
protected string $shortDescriptionAccessibilityDeaf = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $shortDescriptionAccessibilityMental = '';
|
||||
protected string $shortDescriptionAccessibilityMental = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $shortDescriptionAccessibilityVisual = '';
|
||||
protected string $shortDescriptionAccessibilityVisual = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $shortDescriptionAccessibilityWalking = '';
|
||||
protected string $shortDescriptionAccessibilityWalking = '';
|
||||
|
||||
public function getAccessibilityCertification(): ?AccessibilityCertification
|
||||
{
|
||||
|
|
|
@ -30,17 +30,14 @@ class Base extends Minimum
|
|||
{
|
||||
use ManagedBy;
|
||||
|
||||
/**
|
||||
* @var ForeignReference
|
||||
*/
|
||||
protected $photo;
|
||||
protected ForeignReference $photo;
|
||||
|
||||
/**
|
||||
* Images of this Thing.
|
||||
*
|
||||
* @var ForeignReference[]
|
||||
*/
|
||||
protected $images = [];
|
||||
protected array $images = [];
|
||||
|
||||
public function getPhoto(): ?ForeignReference
|
||||
{
|
||||
|
|
|
@ -27,30 +27,18 @@ use WerkraumMedia\ThueCat\Domain\Import\Entity\Properties\ForeignReference;
|
|||
|
||||
class MediaObject extends Minimum implements MapsToType
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $copyrightYear = 0;
|
||||
protected int $copyrightYear = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $license = '';
|
||||
protected string $license = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $licenseAuthor = '';
|
||||
protected string $licenseAuthor = '';
|
||||
|
||||
/**
|
||||
* @var string|ForeignReference
|
||||
*/
|
||||
protected $author;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $type = '';
|
||||
protected string $type = '';
|
||||
|
||||
public function getCopyrightYear(): int
|
||||
{
|
||||
|
|
|
@ -29,33 +29,27 @@ abstract class Minimum
|
|||
* URL to the original source at ThüCAT.
|
||||
* Not unique within our system. We have one entity per language,
|
||||
* while ThüCAT has a single entity containing all languages.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $id = '';
|
||||
protected string $id = '';
|
||||
|
||||
/**
|
||||
* Short name of the thing.
|
||||
* Can be translated.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name = '';
|
||||
protected string $name = '';
|
||||
|
||||
/**
|
||||
* Long text describing the thing.
|
||||
* Can be translated.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
protected string $description = '';
|
||||
|
||||
/**
|
||||
* URL to official version of this thing outside of ThüCAT.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $urls = [];
|
||||
protected array $urls = [];
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
|
|
|
@ -25,15 +25,9 @@ namespace WerkraumMedia\ThueCat\Domain\Import\Entity;
|
|||
|
||||
class Person extends Base implements MapsToType
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $givenName = '';
|
||||
protected string $givenName = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $familyName = '';
|
||||
protected string $familyName = '';
|
||||
|
||||
public function getGivenName(): string
|
||||
{
|
||||
|
|
|
@ -39,60 +39,48 @@ class Place extends Base
|
|||
use Organization;
|
||||
use ContainedInPlace;
|
||||
|
||||
/**
|
||||
* @var Address
|
||||
*/
|
||||
protected $address;
|
||||
protected Address $address;
|
||||
|
||||
/**
|
||||
* @var Geo
|
||||
*/
|
||||
protected $geo;
|
||||
protected Geo $geo;
|
||||
|
||||
/**
|
||||
* @var OpeningHour[]
|
||||
*/
|
||||
protected $openingHoursSpecifications = [];
|
||||
protected array $openingHoursSpecifications = [];
|
||||
|
||||
/**
|
||||
* @var OpeningHour[]
|
||||
*/
|
||||
protected $specialOpeningHours = [];
|
||||
protected array $specialOpeningHours = [];
|
||||
|
||||
/**
|
||||
* @var ForeignReference[]
|
||||
*/
|
||||
protected $parkingFacilitiesNearBy = [];
|
||||
protected array $parkingFacilitiesNearBy = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $sanitations = [];
|
||||
protected array $sanitations = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $otherServices = [];
|
||||
protected array $otherServices = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $trafficInfrastructures = [];
|
||||
protected array $trafficInfrastructures = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $paymentsAccepted = [];
|
||||
protected array $paymentsAccepted = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $distanceToPublicTransport = '';
|
||||
protected string $distanceToPublicTransport = '';
|
||||
|
||||
/**
|
||||
* @var ForeignReference
|
||||
*/
|
||||
protected $accessibilitySpecification;
|
||||
protected ForeignReference $accessibilitySpecification;
|
||||
|
||||
public function getAddress(): ?Address
|
||||
{
|
||||
|
|
|
@ -25,35 +25,17 @@ namespace WerkraumMedia\ThueCat\Domain\Import\Entity\Properties;
|
|||
|
||||
class Address
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $streetAddress = '';
|
||||
protected string $streetAddress = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $addressLocality = '';
|
||||
protected string $addressLocality = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $postalCode = '';
|
||||
protected string $postalCode = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $telephone = '';
|
||||
protected string $telephone = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $faxNumber = '';
|
||||
protected string $faxNumber = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $email = '';
|
||||
protected string $email = '';
|
||||
|
||||
public function getStreetAddress(): string
|
||||
{
|
||||
|
|
|
@ -25,10 +25,7 @@ namespace WerkraumMedia\ThueCat\Domain\Import\Entity\Properties;
|
|||
|
||||
class DayOfWeek
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $dayOfWeek = '';
|
||||
protected string $dayOfWeek = '';
|
||||
|
||||
public function __construct(
|
||||
string $dayOfWeek
|
||||
|
|
|
@ -33,10 +33,8 @@ class ForeignReference
|
|||
* URL to the original source at ThüCAT.
|
||||
* Not unique within our system. We have one entity per language,
|
||||
* while ThüCAT has a single entity containing all languages.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $id = '';
|
||||
protected string $id = '';
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
|
|
|
@ -25,15 +25,9 @@ namespace WerkraumMedia\ThueCat\Domain\Import\Entity\Properties;
|
|||
|
||||
class Geo
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected $longitude = 0.00;
|
||||
protected float $longitude = 0.00;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected $latitude = 0.00;
|
||||
protected float $latitude = 0.00;
|
||||
|
||||
public function getLongitude(): float
|
||||
{
|
||||
|
|
|
@ -31,12 +31,12 @@ class Offer extends Minimum
|
|||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $offerTypes = [];
|
||||
protected array $offerTypes = [];
|
||||
|
||||
/**
|
||||
* @var PriceSpecification[]
|
||||
*/
|
||||
protected $prices = [];
|
||||
protected array $prices = [];
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
|
|
|
@ -27,30 +27,18 @@ use DateTimeImmutable;
|
|||
|
||||
class OpeningHour
|
||||
{
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
protected $validFrom;
|
||||
protected ?DateTimeImmutable $validFrom;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
protected $validThrough;
|
||||
protected ?DateTimeImmutable $validThrough;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable
|
||||
*/
|
||||
protected $opens;
|
||||
protected DateTimeImmutable $opens;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable
|
||||
*/
|
||||
protected $closes;
|
||||
protected DateTimeImmutable $closes;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $daysOfWeek = [];
|
||||
protected array $daysOfWeek = [];
|
||||
|
||||
public function getValidFrom(): ?DateTimeImmutable
|
||||
{
|
||||
|
|
|
@ -28,26 +28,19 @@ use WerkraumMedia\ThueCat\Domain\Import\EntityMapper\PropertyValues;
|
|||
|
||||
class PriceSpecification extends Minimum
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected $price = 0.00;
|
||||
protected float $price = 0.00;
|
||||
|
||||
/**
|
||||
* E.g. 'EUR'
|
||||
* ThueCat specific format.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $currency = '';
|
||||
protected string $currency = '';
|
||||
|
||||
/**
|
||||
* E.g. 'PerPerson'
|
||||
* ThueCat specific property.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $calculationRules = [];
|
||||
protected array $calculationRules = [];
|
||||
|
||||
public function getPrice(): float
|
||||
{
|
||||
|
|
|
@ -29,10 +29,8 @@ trait ManagedBy
|
|||
{
|
||||
/**
|
||||
* The Thing responsible for the data within this Thing.
|
||||
*
|
||||
* @var ForeignReference
|
||||
*/
|
||||
protected $managedBy;
|
||||
protected ?ForeignReference $managedBy;
|
||||
|
||||
public function getManagedBy(): ?ForeignReference
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ trait Organization
|
|||
/**
|
||||
* @var Offer[]
|
||||
*/
|
||||
protected $offers = [];
|
||||
protected array $offers = [];
|
||||
|
||||
/**
|
||||
* @return Offer[]
|
||||
|
|
|
@ -27,55 +27,40 @@ use WerkraumMedia\ThueCat\Domain\Import\EntityMapper\PropertyValues;
|
|||
|
||||
class TouristAttraction extends Place implements MapsToType
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $slogan = '';
|
||||
protected string $slogan = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $startOfConstruction = '';
|
||||
protected string $startOfConstruction = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $museumServices = [];
|
||||
protected array $museumServices = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $architecturalStyles = [];
|
||||
protected array $architecturalStyles = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $digitalOffers = [];
|
||||
protected array $digitalOffers = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $photographies = [];
|
||||
protected array $photographies = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $petsAllowed = '';
|
||||
protected string $petsAllowed = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $isAccessibleForFree = '';
|
||||
protected string $isAccessibleForFree = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $publicAccess = '';
|
||||
protected string $publicAccess = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $availableLanguages = [];
|
||||
protected array $availableLanguages = [];
|
||||
|
||||
public function getSlogan(): string
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ class EntityRegistry
|
|||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $entities = [];
|
||||
private array $entities = [];
|
||||
|
||||
/**
|
||||
* @param string[] $supportedTypes
|
||||
|
|
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||
namespace WerkraumMedia\ThueCat\Domain\Import\EntityMapper;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use function str_starts_with;
|
||||
use Symfony\Component\Serializer\Encoder\JsonDecode as SymfonyJsonDecode;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +38,7 @@ class JsonDecode extends SymfonyJsonDecode
|
|||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $rulesToKeepTypeInfo = [
|
||||
private array $rulesToKeepTypeInfo = [
|
||||
[
|
||||
'type' => 'beginsWith',
|
||||
'comparisonValue' => 'thuecat:facilityAccessibility',
|
||||
|
|
|
@ -28,15 +28,9 @@ use Throwable;
|
|||
|
||||
class MappingException extends Exception
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $jsonLD = [];
|
||||
protected array $jsonLD = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $targetClassName = '';
|
||||
protected string $targetClassName = '';
|
||||
|
||||
public function __construct(
|
||||
array $jsonLD,
|
||||
|
|
|
@ -38,22 +38,16 @@ class Import
|
|||
/**
|
||||
* @var ImportLog[]
|
||||
*/
|
||||
private $importLogStack = [];
|
||||
private array $importLogStack = [];
|
||||
|
||||
/**
|
||||
* @var ImportConfiguration[]
|
||||
*/
|
||||
private $configurationStack = [];
|
||||
private array $configurationStack = [];
|
||||
|
||||
/**
|
||||
* @var ImportLog
|
||||
*/
|
||||
private $currentImportLog;
|
||||
private ImportLog $currentImportLog;
|
||||
|
||||
/**
|
||||
* @var ImportConfiguration
|
||||
*/
|
||||
private $currentConfiguration;
|
||||
private ImportConfiguration $currentConfiguration;
|
||||
|
||||
public function start(ImportConfiguration $configuration): void
|
||||
{
|
||||
|
|
|
@ -43,15 +43,9 @@ use WerkraumMedia\ThueCat\Domain\Repository\Backend\ImportLogRepository;
|
|||
|
||||
class Importer
|
||||
{
|
||||
/**
|
||||
* @var Logger
|
||||
*/
|
||||
private $logger;
|
||||
private Logger $logger;
|
||||
|
||||
/**
|
||||
* @var Import
|
||||
*/
|
||||
private $import;
|
||||
private Import $import;
|
||||
|
||||
public function __construct(
|
||||
private readonly UrlProviderRegistry $urls,
|
||||
|
|
|
@ -32,15 +32,9 @@ use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData\InvalidResponseExcept
|
|||
|
||||
class FetchData
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $databaseUrlPrefix = 'https://cdb.thuecat.org';
|
||||
private string $databaseUrlPrefix = 'https://cdb.thuecat.org';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $urlPrefix = 'https://thuecat.org';
|
||||
private string $urlPrefix = 'https://thuecat.org';
|
||||
|
||||
public function __construct(
|
||||
private readonly RequestFactoryInterface $requestFactory,
|
||||
|
|
|
@ -35,7 +35,7 @@ class SaveData
|
|||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $errorLog;
|
||||
private array $errorLog;
|
||||
|
||||
public function __construct(
|
||||
private readonly DataHandler $dataHandler,
|
||||
|
|
|
@ -28,7 +28,7 @@ class EntityCollection
|
|||
/**
|
||||
* @var Entity[]
|
||||
*/
|
||||
private $entities = [];
|
||||
private array $entities = [];
|
||||
|
||||
public function add(Entity $entity): void
|
||||
{
|
||||
|
|
|
@ -25,40 +25,22 @@ namespace WerkraumMedia\ThueCat\Domain\Import\Model;
|
|||
|
||||
class GenericEntity implements Entity
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $typo3StoragePid;
|
||||
private int $typo3StoragePid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $typo3DatabaseTableName;
|
||||
private string $typo3DatabaseTableName;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $typo3SystemLanguageUid;
|
||||
private int $typo3SystemLanguageUid;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $created = false;
|
||||
private bool $created = false;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $typo3Uid = 0;
|
||||
private int $typo3Uid = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $remoteId;
|
||||
private string $remoteId;
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $data;
|
||||
private array $data;
|
||||
|
||||
public function __construct(
|
||||
int $typo3StoragePid,
|
||||
|
|
|
@ -53,20 +53,14 @@ use WerkraumMedia\ThueCat\Domain\Repository\Backend\TownRepository;
|
|||
|
||||
class GeneralConverter implements Converter
|
||||
{
|
||||
/**
|
||||
* @var Logger
|
||||
*/
|
||||
private $logger;
|
||||
private Logger $logger;
|
||||
|
||||
/**
|
||||
* @var ImportConfiguration
|
||||
*/
|
||||
private $importConfiguration;
|
||||
private ImportConfiguration $importConfiguration;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $classToTableMapping = [
|
||||
private array $classToTableMapping = [
|
||||
TouristAttraction::class => 'tx_thuecat_tourist_attraction',
|
||||
ParkingFacility::class => 'tx_thuecat_parking_facility',
|
||||
Town::class => 'tx_thuecat_town',
|
||||
|
|
|
@ -28,10 +28,7 @@ use WerkraumMedia\ThueCat\Domain\Import\ResolveForeignReference;
|
|||
|
||||
class NameExtractor
|
||||
{
|
||||
/**
|
||||
* @var ResolveForeignReference
|
||||
*/
|
||||
private $resolveForeignReference;
|
||||
private ResolveForeignReference $resolveForeignReference;
|
||||
|
||||
public function __construct(
|
||||
ResolveForeignReference $resolveForeignReference
|
||||
|
|
|
@ -37,7 +37,7 @@ class Registry
|
|||
/**
|
||||
* @var Converter[]
|
||||
*/
|
||||
private $converters = [];
|
||||
private array $converters = [];
|
||||
|
||||
public function registerConverter(Converter $converter): void
|
||||
{
|
||||
|
|
|
@ -29,10 +29,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData;
|
|||
|
||||
class ContainsPlaceUrlProvider implements UrlProvider
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $containsPlaceId = '';
|
||||
private string $containsPlaceId = '';
|
||||
|
||||
public function __construct(
|
||||
private readonly FetchData $fetchData
|
||||
|
|
|
@ -33,7 +33,7 @@ class Registry
|
|||
/**
|
||||
* @var UrlProvider[]
|
||||
*/
|
||||
private $provider = [];
|
||||
private array $provider = [];
|
||||
|
||||
public function registerProvider(UrlProvider $provider): void
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ class StaticUrlProvider implements UrlProvider
|
|||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $urls = [];
|
||||
private array $urls = [];
|
||||
|
||||
public function canProvideForConfiguration(
|
||||
ImportConfiguration $configuration
|
||||
|
|
|
@ -29,10 +29,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData;
|
|||
|
||||
class SyncScopeUrlProvider implements UrlProvider
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $syncScopeId = '';
|
||||
private string $syncScopeId = '';
|
||||
|
||||
public function __construct(
|
||||
private readonly FetchData $fetchData
|
||||
|
|
|
@ -28,25 +28,13 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity as Typo3AbstractEntity;
|
|||
|
||||
class AbstractEntity extends Typo3AbstractEntity
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $remoteId = '';
|
||||
protected string $remoteId = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
protected string $title = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
protected string $description = '';
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
protected $tstamp;
|
||||
protected ?DateTimeImmutable $tstamp;
|
||||
|
||||
public function getRemoteId(): string
|
||||
{
|
||||
|
|
|
@ -35,40 +35,28 @@ use WerkraumMedia\ThueCat\Domain\Import\ResolveForeignReference;
|
|||
|
||||
class ImportConfiguration extends AbstractEntity implements ImportConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
protected string $title = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $type = '';
|
||||
protected string $type = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $configuration = '';
|
||||
protected string $configuration = '';
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
protected $tstamp;
|
||||
protected ?DateTimeImmutable $tstamp;
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<ImportLog>
|
||||
*/
|
||||
protected $logs;
|
||||
protected ObjectStorage $logs;
|
||||
|
||||
/**
|
||||
* @var string[]|null
|
||||
*/
|
||||
protected $urls;
|
||||
protected ?array $urls;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $allowedTypes = [];
|
||||
protected array $allowedTypes = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -98,7 +86,7 @@ class ImportConfiguration extends AbstractEntity implements ImportConfigurationI
|
|||
public function getLastImported(): ?DateTimeImmutable
|
||||
{
|
||||
$lastImport = null;
|
||||
$positionOfLastLog = (count($this->logs) - 1);
|
||||
$positionOfLastLog = count($this->logs) - 1;
|
||||
if ($this->logs->offsetExists($positionOfLastLog)) {
|
||||
$lastImport = $this->logs->offsetGet($positionOfLastLog);
|
||||
}
|
||||
|
|
|
@ -33,17 +33,11 @@ class ImportLog extends Typo3AbstractEntity
|
|||
/**
|
||||
* @var ObjectStorage<ImportLogEntry>
|
||||
*/
|
||||
protected $logEntries;
|
||||
protected ObjectStorage $logEntries;
|
||||
|
||||
/**
|
||||
* @var ImportConfiguration|null
|
||||
*/
|
||||
protected $configuration;
|
||||
protected ?ImportConfiguration $configuration;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
protected $crdate;
|
||||
protected ?DateTimeImmutable $crdate;
|
||||
|
||||
public function __construct(
|
||||
?ImportConfiguration $configuration = null
|
||||
|
|
|
@ -29,15 +29,9 @@ use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLogEntry;
|
|||
|
||||
class MappingError extends ImportLogEntry
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $remoteId = '';
|
||||
protected string $remoteId = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $errors = '';
|
||||
protected string $errors = '';
|
||||
|
||||
public function __construct(
|
||||
MappingException $exception
|
||||
|
|
|
@ -29,40 +29,22 @@ use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLogEntry;
|
|||
|
||||
class SavingEntity extends ImportLogEntry
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $remoteId = '';
|
||||
protected string $remoteId = '';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $insertion = false;
|
||||
protected bool $insertion = false;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $recordUid = 0;
|
||||
protected int $recordUid = 0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $recordPid = 0;
|
||||
protected int $recordPid = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $tableName = '';
|
||||
protected string $tableName = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $errors = '';
|
||||
protected string $errors = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $errorsAsArray = [];
|
||||
protected array $errorsAsArray = [];
|
||||
|
||||
public function __construct(
|
||||
Entity $entity,
|
||||
|
|
|
@ -30,12 +30,12 @@ class Organisation extends AbstractEntity
|
|||
/**
|
||||
* @var ObjectStorage<Town>
|
||||
*/
|
||||
protected $managesTowns;
|
||||
protected ObjectStorage $managesTowns;
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<TouristInformation>
|
||||
*/
|
||||
protected $managesTouristInformation;
|
||||
protected ObjectStorage $managesTouristInformation;
|
||||
|
||||
public function getManagesTowns(): ObjectStorage
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ class Town extends AbstractEntity
|
|||
/**
|
||||
* @var ObjectStorage<TouristInformation>
|
||||
*/
|
||||
protected $touristInformation;
|
||||
protected ObjectStorage $touristInformation;
|
||||
|
||||
public function getTouristInformation(): ObjectStorage
|
||||
{
|
||||
|
|
|
@ -27,15 +27,12 @@ use TYPO3\CMS\Core\Type\TypeInterface;
|
|||
|
||||
class AccessiblitySpecification implements TypeInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serialized;
|
||||
private string $serialized;
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $data;
|
||||
private array $data;
|
||||
|
||||
public function __construct(string $serialized)
|
||||
{
|
||||
|
|
|
@ -27,15 +27,12 @@ use TYPO3\CMS\Core\Type\TypeInterface;
|
|||
|
||||
class Address implements TypeInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serialized;
|
||||
private string $serialized;
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $data;
|
||||
private array $data;
|
||||
|
||||
public function __construct(string $serialized)
|
||||
{
|
||||
|
|
|
@ -27,20 +27,11 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
|||
|
||||
abstract class Base extends AbstractEntity
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
protected string $title = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
protected string $description = '';
|
||||
|
||||
/**
|
||||
* @var Media|null
|
||||
*/
|
||||
protected $media;
|
||||
protected ?Media $media;
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
|
|
|
@ -28,20 +28,17 @@ use TYPO3\CMS\Core\Type\TypeInterface;
|
|||
|
||||
class Media implements TypeInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serialized;
|
||||
private string $serialized;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $data;
|
||||
private array $data;
|
||||
|
||||
/**
|
||||
* @var FileReference[]
|
||||
*/
|
||||
protected $editorialImages = [];
|
||||
protected array $editorialImages = [];
|
||||
|
||||
public function __construct(string $serialized)
|
||||
{
|
||||
|
|
|
@ -30,17 +30,11 @@ class MergedOpeningHour
|
|||
/**
|
||||
* @var MergedOpeningHourWeekDay[]
|
||||
*/
|
||||
private $weekDays = [];
|
||||
private array $weekDays = [];
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
private $from;
|
||||
private ?DateTimeImmutabl $from;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
private $through;
|
||||
private ?DateTimeImmutabl $through;
|
||||
|
||||
public function __construct(
|
||||
array $weekDays,
|
||||
|
|
|
@ -27,20 +27,11 @@ use WerkraumMedia\ThueCat\Domain\TimingFormat;
|
|||
|
||||
class MergedOpeningHourWeekDay
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $opens;
|
||||
private string $opens;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $closes;
|
||||
private string $closes;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $dayOfWeek;
|
||||
private string $dayOfWeek;
|
||||
|
||||
public function __construct(
|
||||
string $opens,
|
||||
|
|
|
@ -31,12 +31,9 @@ class MergedOpeningHours implements Iterator, Countable
|
|||
/**
|
||||
* @var MergedOpeningHour[]
|
||||
*/
|
||||
private $openingHours = [];
|
||||
private array $openingHours = [];
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $position = 0;
|
||||
private int $position = 0;
|
||||
|
||||
/**
|
||||
* @param MergedOpeningHour[] $openingHours
|
||||
|
|
|
@ -27,25 +27,19 @@ use TYPO3\CMS\Core\Utility\ArrayUtility;
|
|||
|
||||
class Offer
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $title;
|
||||
private string $title;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $types;
|
||||
private array $types;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $description;
|
||||
private string $description;
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $prices;
|
||||
private array $prices;
|
||||
|
||||
/**
|
||||
* @param string[] $types
|
||||
|
|
|
@ -28,24 +28,18 @@ use Iterator;
|
|||
use TYPO3\CMS\Core\Type\TypeInterface;
|
||||
|
||||
/**
|
||||
* @implements \Iterator<int, Offer>
|
||||
* @implements Iterator<int, Offer>
|
||||
*/
|
||||
class Offers implements TypeInterface, Iterator, Countable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serialized = '';
|
||||
private string $serialized = '';
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $array = [];
|
||||
private array $array = [];
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $position = 0;
|
||||
private int $position = 0;
|
||||
|
||||
public function __construct(string $serialized)
|
||||
{
|
||||
|
|
|
@ -29,30 +29,18 @@ use WerkraumMedia\ThueCat\Domain\TimingFormat;
|
|||
|
||||
class OpeningHour
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $opens;
|
||||
private string $opens;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $closes;
|
||||
private string $closes;
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $daysOfWeek;
|
||||
private array $daysOfWeek;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
private $from;
|
||||
private ?DateTimeImmutable $from;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable|null
|
||||
*/
|
||||
private $through;
|
||||
private ?DateTimeImmutable $through;
|
||||
|
||||
private function __construct(
|
||||
string $opens,
|
||||
|
|
|
@ -35,20 +35,14 @@ use WerkraumMedia\ThueCat\Service\DateBasedFilter;
|
|||
*/
|
||||
class OpeningHours implements TypeInterface, Iterator, Countable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $serialized = '';
|
||||
private string $serialized = '';
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $array = [];
|
||||
private array $array = [];
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $position = 0;
|
||||
private int $position = 0;
|
||||
|
||||
public function __construct(string $serialized)
|
||||
{
|
||||
|
|
|
@ -28,60 +28,30 @@ use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
|||
|
||||
abstract class Place extends Base
|
||||
{
|
||||
/**
|
||||
* @var Address|null
|
||||
*/
|
||||
protected $address;
|
||||
protected ?Address $address;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $url = '';
|
||||
protected string $url = '';
|
||||
|
||||
/**
|
||||
* @var OpeningHours|null
|
||||
*/
|
||||
protected $openingHours;
|
||||
protected ?OpeningHours $openingHours;
|
||||
|
||||
/**
|
||||
* @var OpeningHours|null
|
||||
*/
|
||||
protected $specialOpeningHours;
|
||||
protected ?OpeningHours $specialOpeningHours;
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<ParkingFacility>
|
||||
*/
|
||||
protected $parkingFacilityNearBy;
|
||||
protected ObjectStorage $parkingFacilityNearBy;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $sanitation = '';
|
||||
protected string $sanitation = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $otherService = '';
|
||||
protected string $otherService = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $trafficInfrastructure = '';
|
||||
protected string $trafficInfrastructure = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $paymentAccepted = '';
|
||||
protected string $paymentAccepted = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $distanceToPublicTransport = '';
|
||||
protected string $distanceToPublicTransport = '';
|
||||
|
||||
/**
|
||||
* @var AccessiblitySpecification|null
|
||||
*/
|
||||
protected $accessibilitySpecification;
|
||||
protected ?AccessiblitySpecification $accessibilitySpecification;
|
||||
|
||||
public function initializeObject(): void
|
||||
{
|
||||
|
|
|
@ -27,43 +27,13 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|||
|
||||
class Price
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $price;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $currency;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $rules;
|
||||
|
||||
private function __construct(
|
||||
string $title,
|
||||
string $description,
|
||||
float $price,
|
||||
string $currency,
|
||||
array $rules
|
||||
private readonly string $title,
|
||||
private readonly string $description,
|
||||
private readonly float $price,
|
||||
private readonly string $currency,
|
||||
private readonly array $rules
|
||||
) {
|
||||
$this->title = $title;
|
||||
$this->description = $description;
|
||||
$this->price = $price;
|
||||
$this->currency = $currency;
|
||||
$this->rules = $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,60 +27,27 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|||
|
||||
class TouristAttraction extends Place
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $slogan = '';
|
||||
protected string $slogan = '';
|
||||
|
||||
/**
|
||||
* @var Offers|null
|
||||
*/
|
||||
protected $offers;
|
||||
protected ?Offers $offers;
|
||||
|
||||
/**
|
||||
* @var Town|null
|
||||
*/
|
||||
protected $town;
|
||||
protected ?Town $town;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $startOfConstruction = '';
|
||||
protected string $startOfConstruction = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $museumService = '';
|
||||
protected string $museumService = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $architecturalStyle = '';
|
||||
protected string $architecturalStyle = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $digitalOffer = '';
|
||||
protected string $digitalOffer = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $photography = '';
|
||||
protected string $photography = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $petsAllowed = '';
|
||||
protected string $petsAllowed = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $isAccessibleForFree = '';
|
||||
protected string $isAccessibleForFree = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $publicAccess = '';
|
||||
protected string $publicAccess = '';
|
||||
|
||||
public function getSlogan(): string
|
||||
{
|
||||
|
|
|
@ -33,10 +33,7 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
|
|||
|
||||
class ResolveEntities implements DataProcessorInterface
|
||||
{
|
||||
/**
|
||||
* @var TypoScriptFrontendController
|
||||
*/
|
||||
private $tsfe;
|
||||
private TypoScriptFrontendController $tsfe;
|
||||
|
||||
public function __construct(
|
||||
private readonly ConnectionPool $connectionPool,
|
||||
|
|
|
@ -29,15 +29,9 @@ use WerkraumMedia\ThueCat\Service\DateBasedFilter;
|
|||
|
||||
class FilterBasedOnTypo3Context implements DateBasedFilter
|
||||
{
|
||||
/**
|
||||
* @var Context
|
||||
*/
|
||||
private $context;
|
||||
|
||||
public function __construct(
|
||||
Context $context
|
||||
private readonly Context $context
|
||||
) {
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,22 +36,10 @@ use WerkraumMedia\ThueCat\Domain\Model\Frontend\Media;
|
|||
*/
|
||||
class AfterObjectThawedHandler
|
||||
{
|
||||
/**
|
||||
* @var FileRepository
|
||||
*/
|
||||
private $fileRepository;
|
||||
|
||||
/**
|
||||
* @var DataMapFactory
|
||||
*/
|
||||
private $dataMapFactory;
|
||||
|
||||
public function __construct(
|
||||
FileRepository $fileRepository,
|
||||
DataMapFactory $dataMapFactory
|
||||
private readonly FileRepository $fileRepository,
|
||||
private readonly DataMapFactory $dataMapFactory
|
||||
) {
|
||||
$this->fileRepository = $fileRepository;
|
||||
$this->dataMapFactory = $dataMapFactory;
|
||||
}
|
||||
|
||||
public function __invoke(AfterObjectThawedEvent $event): void
|
||||
|
|
|
@ -50,10 +50,4 @@ return [
|
|||
TouristAttraction::class => [
|
||||
'tableName' => 'tx_thuecat_tourist_attraction',
|
||||
],
|
||||
\WerkraumMedia\ThueCat\Domain\Model\Frontend\Town::class => [
|
||||
'tableName' => 'tx_thuecat_town',
|
||||
],
|
||||
WerkraumMedia\ThueCat\Domain\Model\Frontend\ParkingFacility::class => [
|
||||
'tableName' => 'tx_thuecat_parking_facility',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -59,8 +59,6 @@ return (static function (string $extensionKey, string $tableName) {
|
|||
'renderType' => 'checkboxLabeledToggle',
|
||||
'items' => [
|
||||
[
|
||||
'label' => '',
|
||||
1 => '',
|
||||
'labelChecked' => $languagePath . '.insertion.yes',
|
||||
'labelUnchecked' => $languagePath . '.insertion.no',
|
||||
],
|
||||
|
|
|
@ -30,7 +30,9 @@ return (static function (string $extensionKey, string $tableName) {
|
|||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => ['type' => 'language'],
|
||||
'config' => [
|
||||
'type' => 'language',
|
||||
],
|
||||
],
|
||||
'l18n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
|
@ -38,7 +40,12 @@ return (static function (string $extensionKey, string $tableName) {
|
|||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [['label' => '', 'value' => 0]],
|
||||
'items' => [
|
||||
[
|
||||
'label' => '',
|
||||
'value' => 0,
|
||||
]
|
||||
],
|
||||
'foreign_table' => $tableName,
|
||||
'foreign_table_where' => 'AND ' . $tableName . '.pid=###CURRENT_PID### AND ' . $tableName . '.sys_language_uid IN (-1,0)',
|
||||
'default' => 0,
|
||||
|
@ -57,8 +64,6 @@ return (static function (string $extensionKey, string $tableName) {
|
|||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
'label' => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true,
|
||||
],
|
||||
],
|
||||
|
|
|
@ -30,7 +30,9 @@ return (static function (string $extensionKey, string $tableName) {
|
|||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => ['type' => 'language'],
|
||||
'config' => [
|
||||
'type' => 'language',
|
||||
],
|
||||
],
|
||||
'l18n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
|
@ -38,7 +40,12 @@ return (static function (string $extensionKey, string $tableName) {
|
|||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [['label' => '', 'value' => 0]],
|
||||
'items' => [
|
||||
[
|
||||
'label' => '',
|
||||
'value' => 0,
|
||||
]
|
||||
],
|
||||
'foreign_table' => $tableName,
|
||||
'foreign_table_where' => 'AND ' . $tableName . '.pid=###CURRENT_PID### AND ' . $tableName . '.sys_language_uid IN (-1,0)',
|
||||
'default' => 0,
|
||||
|
|
|
@ -33,10 +33,8 @@ abstract class AbstractImportTestCase extends \TYPO3\TestingFramework\Core\Funct
|
|||
/**
|
||||
* Whether to expect errors to be logged.
|
||||
* Will check for no errors if set to false.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $expectErrors = false;
|
||||
protected bool $expectErrors = false;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@ -88,7 +86,11 @@ abstract class AbstractImportTestCase extends \TYPO3\TestingFramework\Core\Funct
|
|||
return;
|
||||
}
|
||||
foreach ($this->getLogFiles() as $file) {
|
||||
self::assertSame('', file_get_contents($file), 'The TYPO3 log file "' . $file . '" contained content while expecting to be empty.');
|
||||
self::assertSame(
|
||||
'',
|
||||
file_get_contents($file),
|
||||
'The TYPO3 log file "' . $file . '" contained content while expecting to be empty.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue