Custom Events can be triggered using Custom Logic. The following parameters are Required to execute the Event.
Code Block |
---|
language | php |
---|
title | Custom Event |
---|
linenumbers | true |
---|
|
/**
* 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 ...
]
); |