modX.addEventListener
Last updated not available | Page history | Improve this page | Report an issue
modX::addEventListener¶
Add a plugin to the eventMap
within the current execution cycle.
Syntax¶
API Doc: modX::addEventListener()
boolean addEventListener (string $event, integer $pluginId, [string $propertySetName = ''])
-
$event
(string) Name of the event. required -
$pluginId
(integer) Plugin identifier to add to the event. required -
$propertySetName
(string) The name of property set bound to the plugin
Example¶
Add a Plugin with ID 2 to the Event OnChunkPrerender
:
$modx->addEventListener('OnChunkPrerender', 12);