Jump to main content Jump to doc navigation

modX.invokeEvent

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

modX::invokeEvent

Invokes a specified Event with an optional array of parameters.

Syntax

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

void invokeEvent (string $eventName, [array $params = array ()])

Example

Invoke the OnChunkRender event:

$modx->invokeEvent('OnChunkRender',array(
   'id' => $chunk->get('id'),
));

See Also