Jump to main content Jump to doc navigation

modX::addEventListener

Add a plugin to the eventMap within the current execution cycle.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_modx.class.html#%5CmodX::addEventListener()

boolean addEventListener (string $event, integer $pluginId)

Example

Add a Plugin with ID 2 to the Event 'OnChunkPrerender':

$modx->addEventListener('OnChunkPrerender',12);

See Also