on() public method
Attaches an event handler to an event. The event handler must be a valid PHP callback. The following are some examples: function ($event) { ... } // anonymous function
[$object, 'handleClick'] // $object->handleClick()
['Page', 'handleClick'] // Page::handleClick()
'handleClick' // global function handleClick()
The event handler must be defined with the following signature, function ($event)
where $event is an yii\base\E