Search code examples
modx

How do I apply removeEventListener to a specific MODX plugin?


modx has a $ modx-> removeEventListener method that removes an event from the event map so that it won't be called. but as I understood it removes it for the whole system. but how to remove event tracking from a specific plugin?

MODX Revolution 2.7.3-pl


Solution

  • https://github.com/modxcms/revolution/blob/63ae5d2ae18589838ffd01ba0405bf3662d9496e/core/model/modx/modx.class.php#L1985 the documentation, unfortunately was not updated, although it has been updated .. the second parameter is the plugin ID

    public function removeEventListener($event, $pluginId = 0)