lochmueller / calendarize

📆 Best TYPO3 Calendar ever 📆
http://typo3.org/extensions/repository/view/calendarize
75 stars 84 forks source link

Possibility to manipulate calendarize indices (custom event model) with e.g. an own controller #772

Closed blueamerican closed 7 months ago

blueamerican commented 7 months ago

I have a common question about further manipulating my indices:

TYPO3 11 calendarize 12.4.2

I have my own extension with my own model (in my case events). Then i register my model to EXT calendarize, something like

\HDNET\Calendarize\Register::extTables($configuration);

now i can use the EXT calendarize in my model and the output in the e.g. list-view is as expected: i get the indices from calendarize.

But how can i go further?

Where do i have a controller, in which i can work? e.g. to fix the category selection I have my own extension, which possibilities do i have to manipulate the results of calendarize? Or to implement further logic?

Is there an example EXT where i can see this?

best regards markus

lochmueller commented 7 months ago

Hey @blueamerican ,

feel free to ask questions via Slack. Github issues are the better way for bugs and features.

Related to your question, "But how can i go further?" -> There are no extensions with "controllers that allow direct manipulation"except with events/signals/Hooks etc.. If you need a simple case just use the Controller as it is. If you need complex business logic, feel free to write your own controller. I need more information about the use case to suggest the best way for your integration.

"fix the category selection" -> Sound like a bug. Could you explain it and we solve this in extension together? Please keep in mind, that the category selection is a event listener https://github.com/lochmueller/calendarize/blob/master/Classes/EventListener/CategoryConstraintEventListener.php#L15 perhaps you have another use case and can write your event Listener (note: There are many events in EXT:calendarize to customize the rendering and selection).

"I have my own extension, which possibilities do i have to manipulate the results of calendarize?" -> Please check the events in the IndexRepository to manipulate the result set of the selection. If you mean the HTML with result, feel free to override the needed templates.

"Or to implement further logic?" -> Need more details.

"Is there an example EXT where i can see this?" -> https://github.com/lochmueller/calendarize#calendarize-infrastructure These are extended data structures for the base extension. There are no examples for the event listeners are complex html templates overrides. But both is TYPO3 standard.

I hope this helps...

Regards, TIm