Jump to main content Jump to doc navigation

modX::invokeEvent

Invokes a specified Event with an optional array of parameters.

Syntax

API Doc: modX::invokeEvent()

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

Example

Invoke the OnChunkRender event:

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

See Also