Allow plugins to filter subevents in the public calendar (#5457)

* Allow plugins to filter subevents in the public calendar

* Add to docs

* Review notes
This commit is contained in:
Raphael Michel
2025-09-11 19:40:10 +02:00
committed by GitHub
parent b3974067a5
commit ed9250c522
5 changed files with 210 additions and 84 deletions

View File

@@ -415,3 +415,19 @@ consent state. Receivers should return a list of ``pretix.presale.cookies.Cookie
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
filter_subevents = GlobalSignal()
"""
Arguments: ``subevents``, ``sales_channel``
This signal allows you to filter which subevents are publicly available. Receivers are passed a
list of subevents that are about to be shown to the user and are expected to return a list of the
same format, with all subevents removed that should not be available for sale.
``sales_channels`` is a ``SalesChannel`` instance.
This is not an event-plugin signal as this will also be called on the organizer level when showing
a list of subevents across events. Expect that the subevents in the input are mixed from different
events. However, receivers will only receive subevents of events that the plugin is active for and
can only filter out these.
"""