Commit graph

52 commits

Author SHA1 Message Date
Daniel Siepmann 8acbe136d4
Add special opening hours (#84)
It is possible to define special opening hours, e.g. for holidays.
Those are now also imported and provided to the templates.

Relates: #10185
2022-11-28 11:06:54 +01:00
Daniel Siepmann 672f78a5dc
Filter and sort opening hours (#83)
Opening hours are filtered. Opening hours from the past are no longer
available.
Opening hours are sorted. Newer opening hours are shown last.

Relates: #10185
2022-11-24 15:55:50 +01:00
Daniel Siepmann 4cb1cf1438
Import image author beside image license author (#82)
This allows to use a fallback.
Some maintain the actual copyright as author instead of license author.

Relates: #10183
2022-11-24 11:05:13 +01:00
Daniel Siepmann 2fd4b1bc2f
Handle multiple offerType values (#75)
The import resulted in an exception if there was an array of types
instead of a string.
Both situations are now handled and API of models is kept.
Existing imported data is also kept.
2022-09-29 14:33:19 +02:00
Daniel Siepmann 4a3eb42c73
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.
2022-09-29 14:10:36 +02:00
Daniel Siepmann 7f6bd13628
Remove deprecated usage of StringUtility::endsWith() (#70)
This is deprecated in newer PHP versions, one should use native
str_ends_with() instead.

We remove the deprecation by using this function. But we also support
older PHP versions, so we add symfony/polyfill-php80 as dependency to
always ensure this function exists.
2022-09-13 09:44:54 +02:00
Benjamin Franzke 9bdb998f6d
Use decorator pattern for RequestFactory (#54)
The implementation of the TYPO3 RequestFactory and Uri classes is
internal API.

It is therefore better to decorate the PSR-17 interfaces instead
of extending or using the TYPO3 implementation directly.
2022-09-13 09:09:43 +02:00
Daniel Siepmann 2e4c9cc04e
Add TYPO3 v11 support (#60)
* Support generation of code coverage generation
* Remove useless caching within GitHub
* Add TYPO3 11.5 within CI
* Update phpstan

Replace friendsoftypo3/phpstan-typo3 with saschaegerer/phpstan.
The friendsoftypo3 is intended for TYPO3 itself, while saschaegerer is
intended for community.
Also update all related packages.
Fix some new findings and update baseline.

* Run composer none interactive in CI
* Remove dependency checker
* Migrate tests to no longer use legacy dependencies
* https://forge.typo3.org/issues/97479
* Fix phpstan findings
2022-09-13 09:05:47 +02:00
Daniel Siepmann 185dcab2bc
Add Offer Type (#49) 2021-09-13 10:32:12 +02:00
Daniel Siepmann c97b9bd24d Skip import of entities without content responsible
We always expect someone to be responsible for content.
If there is no one, skip the import of the entity.
2021-09-08 15:22:43 +02:00
Daniel Siepmann 2932a620e4 Don't store empty info for opening hour
Do not store none existing info.
Just store nothing if something is missing.

Frontend model already checks for existence.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 5179e82706 Improve skipping detection in TYPO3 converter
All records which are not saved or useable are now skipped.
Some records were converted but could not be stored, e.g. because no
localization was configured for that table.

This should bring small performance improvement and also align import
log with actually imported (converted) records.

Logging is added as well, only debug level, to allow developer and
integrator to analyse why some records are skipped.

Ignore some errors which don't actually exist.
We already check type of entity, and logger is always injected.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 07f189a7f8 Support multiple price rules 2021-09-06 13:47:12 +02:00
Daniel Siepmann 592269baa8 Handle references ending in 404
Catch the exception and return null.
That is already a possible return type which should be handled by
callers.

Add test case with referenced 404 image.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 265cb27236 Support multiple provided URLs
An object might have more then a single URL.
This is now added.
2021-09-06 13:47:12 +02:00
Daniel Siepmann 8315d42934 Add accessibility_specification 2021-09-06 13:47:12 +02:00
Daniel Siepmann cc216429a5 Add parking_facility_near_by
- Removed individual converters for TYPO3.
  Conversion is now handled in a single converter.
- The new converter will import necessary dependencies upfront, e.g.
  town or organisation.
- Move import state into extra class.

Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 5859c14525 Add distanceToPublicTransport property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 46fe3a2e81 Add availableLanguage property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 4c9b055e0c Add publicAccess property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann ffd894c102 Add isAccessibleForFree property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann bd717d1596 Add petsAllowed property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann ce6a34b543 Add photography property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 07cd56fef4 Add digitalOffer property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 4a1928ece6 Add paymentAccepted property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann c1167a7848 Add trafficInfrastructure property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 3ce8f13b04 Add architecturalStyle property to tourist information
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 92d33c0956 Add museumService property to tourist information
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann b41ba9b6d1 Add otherService propterty to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann b1ce004ddb Add sanitation property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 78796e1efa Add startOfConstruction property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 0f59085653 Add slogan property to tourist attraction
Relates: #34
2021-09-06 13:47:12 +02:00
Daniel Siepmann 075a591256 Add strict_types to all files 2021-08-12 09:46:37 +02:00
Daniel Siepmann 7c8dd0df3b Cleanup refactoring after big refactoring 2021-08-12 09:46:37 +02:00
Daniel Siepmann bfd4c77a17 Refactor parsing of JSON-LD
Use Symfony components to map incoming JSON onto objects.
Those provide a mapping. They can then be used to fetch the data in a
common way and insert it into the system.

- Handle languages within JsonDecode
  (normalize incoming data based on language)
- Handle Single Value and List of Values within Entities. They will map
  incoming Data to proper Objects. (We now generally transform during
  serialization process if target is array but we got single entity)
- Add missing tests for existing data.
- Finish migration of all existing data, this includes next step
- Provide discriminator to ObjectNormalizer to auto detect target class
  based on "type" property. (Done for now by own registry)
- Combine generated object with current structure for import -> generate
  data array out of it.
- Resolve foreign references to existing entities,
  (images, contentresponsible, etc.)
2021-08-12 09:46:37 +02:00
Daniel Siepmann dc09713884 Move namespace below initial file comment 2021-08-10 09:41:54 +02:00
Daniel Siepmann 9c60e275d0 Handle 404 for assigned media 2021-06-08 14:05:24 +02:00
Daniel Siepmann 6b19485a36 Handle resources with missing containedInPlace
Check for situation and return empty array.
Do not create unnecessary requests to database but directly return.
2021-06-08 14:05:24 +02:00
Daniel Siepmann 197a3e4696 Support sync scope
Add new configuration to support sync scope.
This one requires the provided sync scope id and will always update all
entries.

Relates: #23
2021-06-01 09:43:33 +02:00
Daniel Siepmann 22932545d3 Handle relation to single "containedInPlace"
Only multiple containedInPlace were supported.
Some instances only have a single containedInPlace. This is now handled
as well.
2021-05-10 09:41:25 +02:00
Daniel Siepmann c91f665d98 Make compatible with PHP 7.3
As some projects still might run on PHP 7.3 and supported TYPO3 version
still supports 7.3.
2021-04-13 15:32:10 +02:00
Daniel Siepmann bf1ae9540b Fix two bugs: Language handling and price structure
Sorry for fixing two things in one commit.

First fixed bug is single offer and / or single price.
Those lead to exception / fatal error and are now handled.

Second fixed bug is wrong multi language handling.
Instead of using supported languages from entity (which does not exist
and was miss interpreted) we use configured system languages.
Each record is inserted with default language.
Also tourist attractions are inserted for all other languages.
They are only inserted if they have a title for that language.
2021-02-25 09:23:06 +01:00
Daniel Siepmann 442a6842ec Add prices to tourist attraction
Import prices, show them in records and make them accessible in
frontend.
2021-02-18 16:00:07 +01:00
Daniel Siepmann 2e0102894f Allow to configure storage pid for each import configuration
Each import configuration now offers an input to define storage pid.
That enables integrators to have different storage folders per
configuration.
2021-02-17 15:37:49 +01:00
Daniel Siepmann 92c8bbedaa Add multi language handling
Import entities in all available languages.
Provide translated records in frontend.
2021-02-17 14:51:00 +01:00
Daniel Siepmann 6478526004 Add media to tourist attraction 2021-02-17 09:20:24 +01:00
Daniel Siepmann eab2eee8b3 Add address to tourist attraction 2021-02-17 09:20:24 +01:00
Daniel Siepmann 9176ba0cec Import tourist attraction only in German language
Allows to import entity of type TouristAttraction.
Right now only in German, as this is most important.
Add output of tourist attraction via custom content element.
2021-02-16 12:01:35 +01:00
Daniel Siepmann ce787c90b6 Use storage pids from example setup
As long as those are hard coded, use matching storage pids from example
setup.
2021-02-16 11:09:18 +01:00
Daniel Siepmann 2ddd52b284 Change flash message in case of error
Still very simple, but can be improved in future updates.
E.g. add info regarding error, or deep link to single import log with
errors, etc.
To provide that, we need to add some more code, which is not necessary
yet.
2021-02-16 11:09:18 +01:00