Yii Framework Forum: Yii2: More Events In Controller - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Yii2: More Events In Controller Rate Topic: -----

#1 User is offline   ehm Plankje? 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 27-September 13

Posted 09 June 2014 - 10:34 AM

I was working on a Behavior for which I had to listen to the Controller::render() method to be called. Even more, I had to distinguish between the type of render method called. Unfortunately, the Controller class only offers two events: EVENT_BEFORE_ACTION and EVENT_AFTER_ACTION. It would be nice if this list at least were extended with:


I know it is not likely new features will be added to current 2.0.0beta, but this is a minor adjustment with no disadvantages or compatibility issues. It would help me greatly, because I don't want my components to extend from custom components, but I prefer the default components instead. :)

If anyone else is missing events, feel free to complement my list.

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,221
  • Joined: 17-January 09
  • Location:Russia

Posted 17 June 2014 - 06:10 AM

There are additional events in \yii\base\View and \yii\web\View.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users