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.)
This should ensure rendering works as expected.
Most important: This ensures data is available in frontend templates.
Add dev dependency to fluid_styled_content. This is necessary to test
our rendering integration with fluid_styled_content defaults.
Relates: #34
Import Configuration can now be stored on folders, beside the site root.
That way editors can create and edit records.
The default storage pid for new records can be defined via TypoScript.
Resolves: #24
That's necessary as models grow.
Added features should be tested to not break with future changes.
The tests revealed an existing error in fallback which got fixed to make
new test pass.
Relates: #18
The steps are only necessary to check changes before merging.
Everyone always creates pull requests.
Therefore no need to run in push in addition to PR.
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.
To ensure the whole process is still working.
Setup environment and execute request of backend module through extbase.
Ensure expected records are created.
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.
Insertion is stored as integer in database.
Therefore cast boolean to integer.
Otherwise DataHandler might throw error as saved data type differs from
provided data type.