Method | Description | |
---|---|---|
disable ( ) | Disable event handling | |
enable ( ) | Enable event handling | |
fire ( string $eventName, array | |
Fire event | |
getEventListeners ( $eventName ) : array | Get array of event listeners | |
listen ( string $eventName, |
Subscribe to event | |
subscribe ( Webiny\Component\EventManager\EventSubscriberInterface $subscriber ) | Subscribe to events using event subscriber |
Method | Description | |
---|---|---|
init ( ) | Singleton constructor |
Method | Description | |
---|---|---|
fireWildcardEvents ( $eventName, $data, $resultType ) : null | array | Process events starting with given prefix (ex: webiny.* will process all events starting with 'webiny.') |
public disable ( ) |
public enable ( ) |
public fire ( string $eventName, array | |
||
$eventName | string | Event to fire. You can also use wildcards to fire multiple events at once, ex: 'event.*' |
$data | array | |
Array or Event object |
$resultType | null | If specified, the event results will be filtered using given class/interface name |
$limit | null | integer | Number of results to return |
return | array | Array of results from EventListeners |
public getEventListeners ( $eventName ) : array | ||
$eventName | ||
return | array |
public subscribe ( Webiny\Component\EventManager\EventSubscriberInterface $subscriber ) | ||
$subscriber | Webiny\Component\EventManager\EventSubscriberInterface | Subscriber class |