Yii – Behaviors

  • Post author:
  • Post category:Yii
  • Post comments:1 Comment

Behaviors are instances of the yii\base\Behavior class. A behavior injects its methods and properties to the component it is attached to. Behaviors can also respond to the events triggered by…

Continue ReadingYii – Behaviors

Yii – Events

  • Post author:
  • Post category:Yii
  • Post comments:0 Comments

You can use events to inject custom code at certain execution points. You can attach custom code to an event, and when the event is triggered, the code gets executed. For example,…

Continue ReadingYii – Events