dispatchEvent()
dispatchEvent(string $name, array|null $data = null, object|null $subject = null) : \Cake\Event\Event
Wrapper for creating and dispatching events.
Returns a dispatched event.
Parameters
| string | $name | Name of the event. |
| array|null | $data | Any value you wish to be transported with this event to it can be read by listeners. |
| object|null | $subject | The object that this event applies to ($this by default). |