Yii Framework Forum: new hooks, beforeRender afterRender - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

new hooks, beforeRender afterRender What are the benefits related to having these hooks? Rate Topic: -----

#1 User is offline   thinkt4nk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 19-September 10

Posted 05 November 2010 - 10:14 PM

I just saw that beforeRender() and afterRender() were added to CController. I remember seeing something like this in Cake, but I can't recall what the supposed benefits were. Can someone enlighten me?

~thinkt4nk
0

#2 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 06 November 2010 - 02:55 AM

In the after render you can filter wich script will be actually sent to the client.

This can be useful for avoinding sending more than once the script after render partial, for example.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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