Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2022.2

Custom Events can be triggered using Custom Logic. The following parameters are Required to execute the Event.

Code Block
languagephp
titleCustom Event
linenumberstrue
/**
* Event: Custom Event Name
* Listener Class: Core Model Event
* Listener Method: eventCustom
*/

PCR_Event::attachDb(
    'custom-event-name',
    ['Core_Model_Event' => 'eventCustom']
);
PCR_Event::trigger(
    'custom-event-name',
    [
        'custom_identifier' => 'identifier used on Custom Event',
        // ... Any other params for Custom Event Logic ...
    ]
);