Commit f2e76fe3 by Qiang Xue

Merge pull request #1217 from egorpromo/events-enhancement

It is more obvious what to pass in trigger() method
parents a2fe1284 4d720389
...@@ -436,7 +436,7 @@ class Component extends Object ...@@ -436,7 +436,7 @@ class Component extends Object
* @param string $name the event name * @param string $name the event name
* @param Event $event the event parameter. If not set, a default [[Event]] object will be created. * @param Event $event the event parameter. If not set, a default [[Event]] object will be created.
*/ */
public function trigger($name, $event = null) public function trigger($name, Event $event = null)
{ {
$this->ensureBehaviors(); $this->ensureBehaviors();
if (!empty($this->_events[$name])) { if (!empty($this->_events[$name])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment