ContainerAwareEventDispatcher::addListenerService()

addListenerService(string $eventName, array $callback, int $priority)

Adds a service as event listener.

Parameters

string $eventName Event for which the listener is added
array $callback The service ID of the listener service & the method name that has to be called
int $priority The higher this value, the earlier an event listener will be triggered in the chain. Defaults to 0.

Exceptions

InvalidArgumentException
doc_Symfony
2016-10-28 06:11:50
Comments
Leave a Comment

Please login to continue.