Jump to main content Jump to doc navigation


Remove an event from the eventMap so it will not be invoked.


API Doc: modX::removeEventListener()

boolean removeEventListener (string $event, [integer $pluginId = 0])
  • $event (string) The name of the Event you wish to remove. required
  • $pluginId (integer) ID of certain Plugin for which I want to delete the Event


Prevent any Events from firing on 'OnChunkRender':


Prevent Events from firing on 'OnLoadDocument' for Plugin with ID = 2

$modx->removeEventListener('OnLoadDocument', 2);

See Also