Jump to main content Jump to doc navigation

modX::removeEventListener

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

Syntax

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

Examples

Prevent any Events from firing on 'OnChunkRender':

$modx->removeEventListener('OnChunkRender');

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

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

See Also

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Digital Penguin
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Following Sea
  • Anton Tarasov
  • eydolan
  • Raffy
  • Lefthandmedia
  • Murray Wood
  • Snow Creative
  • Nick Clark
  • Helen
  • JT Skaggs
  • krisznet
  • YJ
  • Yanni
  • Richard

Budget

$366 per month—let's make that $500!

Learn more