Commit graph

230 commits

Author SHA1 Message Date
8ded245785 Fix Category type miss match during import
Extbase Category repository was used, while custom Category instances
were expected.
The repository didn't inherit from Extbase Repository and therefore
didn't provide expected findByUid method.
2021-09-07 08:40:09 +02:00
Dirk Koritnik
919db32131 Merge branch 'feature/typo3-v10' into 'master'
State compatibility with v10

See merge request typo3/events!8
2021-09-07 06:12:57 +00:00
410a73052e Fix type miss match of object storages
The properties should always be ObjectStorage instances.
We streamline the annotation and initialization to ensure exactly that.

Also import needs small adjustment as it still expected null as possible
return type.
2021-09-07 07:54:43 +02:00
018fdc697e Fix RemoveAllCommand return type
The command should always return an integer as exit code.
The called method does not return anything, resulting in null to be
returned.
2021-09-07 07:54:43 +02:00
d0cb951550 Do not break performance when no postponed date exists
Some sites do not use postponed_date at all.
It would be a massive performance issue to still search for them for
each and every date instance that is created.

This small addition will solve the issue for those pages.
It will still once at least one internal reference is added.

We could then try to add proxies which are build and added, but don't
use the DB. That way the performance would still be okay, and data will
only be fetched when used.
2021-09-07 07:54:43 +02:00
8816eca99e Migrate Pagination configuration
POST is no longer supported, only GET.
Whole pagination is deprecated and will be removed in v12.
2021-09-07 07:54:42 +02:00
8201782b6f Properly check for images
Do not check for models, but actual file.
They might be missing, e.g. cause not downloaded from production into
dev environment.

The new checks ensure the page will not break with an exception, but
show default images.
2021-09-07 07:54:42 +02:00
3822b86df6 Fix Category type miss match during import
Extbase Category repository was used, while custom Category instances
were expected.
2021-09-07 07:54:41 +02:00
8ddbc2fb88 Handle missing target folder on import 2021-09-07 07:54:02 +02:00
beca8c2e07 Keep old legacy command identifier
The old identifier had a trailing comma.
Old installations would break if we do not keep the command under this
identifier.
Updating scheduler tasks is a bad thing, so we keep compatibility.
2021-09-07 07:54:01 +02:00
39d4f628e3 Prevent broken event state when build from db result
The process will not call __construct, the object storages might not be
initialized. Therefore initializeObject is now implemented which is
calling the existing method to initialize object storages.
2021-09-07 07:52:30 +02:00
326378e2fc Allow to reference events from event
This might be useful to allow editors and integrators to create
something like "you might also be interested in" or "related events".
2021-09-07 07:52:29 +02:00
97bcbe2065 Add original date to dates if available
This is not possible via native API.
We therefore use the event to fetch and add the relation.

Relates: #8857
2021-09-07 07:52:29 +02:00
36ecc9bbe8 Add cObject data to fluid when available
Relates: #9012
2021-09-07 07:52:29 +02:00
ed23c783cd Adjust formatting 2021-09-07 07:52:28 +02:00
5440ef4f72 Fix not available cache for events_category
Adjust cache name to match TYPO3 v10 convention without "cache_" prefix.
Add default configuration to prevent issue if integrator does not
configure cache.
2021-09-07 07:52:28 +02:00
1929a4a566 Use sorting of categories
Extbase will properly use mm sorting.
But categories can't be sorted within the TCA tree component.
Therefore it makes more sense to use actual sys_category sorting.
In order to do so, we add our own model and pass the sorting.
That way PHP can do the sorting.

That's the easiest approach.
Also events shouldn't contain to many categories.  A performance impact
should not be high.

Relates: #8459
2021-09-07 07:52:28 +02:00
Dirk Koritnik
9a8ee30580 Increase image limit 2021-09-07 07:52:27 +02:00
Dirk Koritnik
2450f5c6b7 Switch to Storage Object for images 2021-09-07 07:52:27 +02:00
cbbe56775e Allow to add link for canceled dates
E.g. allow users to get info about refunds.

Relates: #8574
2021-09-07 07:52:26 +02:00
bfaa25c707 Do not allow self reference for postponed date 2021-09-07 07:52:26 +02:00
3012816123 Allow to delete events
Relates: #8570
2021-09-07 07:52:26 +02:00
10b4c34fe6 Allow to define a new date if current is postponed
Relates: #8092
2021-09-07 07:52:25 +02:00
c65ae5023f Allow integrator to set start or end for date via settings
Respect start and end when creating demand from settings.
That way integrator can configure it via TypoScript, or provide an
FlexForm.

Also the query was adjusted. It now respects a single value and doesn't
need start and end.
That way upcoming events can be created.

Relates: #8581
2021-09-07 07:52:25 +02:00
cf2b571fda Support manual sorting in foreign language
Given: Website uses copy / free mode of localization.
       and Editor selects specific events to display.
Then:  Those events should be displayed as selected.

Before this change the sorting was applied on uid of objects,
which is the uid of default lanugage record. But editors might select
localized uids. Therefore a fallback is added in case no object was
found.

Relates: #8557
2021-09-07 07:52:25 +02:00
Dirk Koritnik
4a8abbe344 Add getter and setter for caceled 2021-09-07 07:52:24 +02:00
Dirk Koritnik
ce723b01bc Extend date canceld form 2021-09-07 07:52:24 +02:00
Dirk Koritnik
55530ee062 Allow multiline in title and subtitle 2021-09-07 07:52:23 +02:00
Dirk Koritnik
9d2825ed18 Allow multiline in event name 2021-09-07 07:52:23 +02:00
afa6384636 Allow localization of event 2021-09-07 07:52:23 +02:00
4e2f191030 Fix broken demand support for categories
This was broken since changes during update.
2021-09-07 07:52:22 +02:00
cbd59a366d Support new DI
Provide Services.yaml to provide new DI.
Also remove deprecated command registration and move them into
Services.yaml.
2021-09-07 07:52:22 +02:00
59db0d6432 Do not limit 3 categories
There is no reason to limit.
By default there should be no limit.
If a specific installation needs a limit, it can set it itself.
2021-09-07 07:52:22 +02:00
Dirk Koritnik
431aa9bafa Inrease image limit in event 2021-09-07 07:52:21 +02:00
Dirk Koritnik
ce9a1e17e5 Add subtitle filed to event 2021-09-07 07:52:21 +02:00
Dirk Koritnik
8e755d775a Remove old plugin 2021-09-07 07:52:21 +02:00
Dirk Koritnik
1d6d91e9e2 Add location name to detail view 2021-09-07 07:52:20 +02:00
Dirk Koritnik
ea103cb002 Little cleanups and remove old plugin code 2021-09-07 07:52:20 +02:00
Dirk Koritnik
4c0a0a959b Restructure event TCA 2021-09-07 07:52:19 +02:00
Dirk Koritnik
201259d674 Add new icons 2021-09-07 07:52:19 +02:00
ca7340782b Allow an date to be marked as canceled
That has no effect, the info is just available from model.
This can be used to display a canceled date in a different way, or
render a notice.

Relates: #8092
2021-09-07 07:52:19 +02:00
f111884299 Refactor and streamline event code
Make controller smaller, remove unused code.
Move creation of demand object into its own factory.
Reduce npath complexity in repository and move parts into named methods.
2021-09-07 07:52:18 +02:00
17bd83eedf Provide new "Event selected" plugin
Allow editors to select specific events to display.
Therefore add new necessary demand and setting for events and respect
them within repository.

Relates: #8092
2021-09-07 07:52:18 +02:00
8da7284e1f Allow f:debug for event models
Private properties lead to an exception when using f:debug in Fluid.

Relates: #8092
2021-09-07 07:52:18 +02:00
43d8a1c0d6 Add partner
Add new record type partner.
This can be something like a media partner or something else.

Allow an event to have zero or more partner.
Add necessary files and models with relations.

Relates: #8092
2021-09-07 07:52:17 +02:00
38b4844a9d Add pages to events
Allow editor to reference TYPO3 page records from events.
E.g. used to provide further internal information links.

Also those pages are resolved via DataProcessing.
That allows integrators to be 100% flexible to resolve those page info.
By default a menu is generated and media is resolved.

Also validation is ignored, as this improves performance and allows to
use the new class as injected property without validation fails.
Models are not managed via frontend and therefore don't need validation.

Relates: #8092
2021-09-07 07:52:17 +02:00
acc0c2bdc5 Manually migrate cascade annotation
Relates: #8092
2021-09-07 07:52:17 +02:00
5a483b6b2a Allow to use plugin icon via identifier
The icon is still a placeholder.
Still we provide the identifier to already use it in sitepackages.
That way the extension can exchange the file, but foreign configuration
can stay.

Relates: #8092
2021-09-07 07:52:16 +02:00
cb50981a2b Setup unit testing
* Add dependency.
* Remove empty tearDown() methods.
* Fix signature of setUp() to be compatible with recent phpunit.
* Temporary fix syntax issues in test files

Relates: #8092
2021-09-07 07:52:16 +02:00
0c58be43ff Manual CGL adjustments
Not covered by PSR / phpcs

Relates: #8092
2021-09-07 07:52:15 +02:00