Download the PHP package contao-community-alliance/events-create-options without Composer
On this page you can find all versions of the php package contao-community-alliance/events-create-options. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download contao-community-alliance/events-create-options
More information about contao-community-alliance/events-create-options
Files in contao-community-alliance/events-create-options
Package events-create-options
Short Description options_callback event and helpers for Contao Open Source CMS
License LGPL-3.0-or-later
Informations about the package events-create-options
Events: Create options
Event and helper classes to provide option_callback's via events.
In your DCA, define the options_callback
with the factory class CreateOptionsEventCallbackFactory
.
Now you can fill the options with an event listener, listening on the event named tl_foo.some_select.create-options
.
Manipulate the options with a second event listener is pretty easy.
See the event dispatcher documentation for more examples how to listen on an event.
Custom event
By default, an event of type ContaoCommunityAlliance\Contao\Events\CreateOptions\CreateOptionsEvent
is used.
If you want your own event type, you can pass the class or a factory method as second parameter to CreateOptionsEventCallbackFactory::createCallback()
.
First you need to write your own create-options event class.
Then you need to add your factory to CreateOptionsEventCallbackFactory::createCallback()
.
All versions of events-create-options with dependencies
contao/core Version ^3.5.5
contao-community-alliance/composer-plugin Version ^2.0
contao-community-alliance/event-dispatcher Version ^1.0