Commit 8bb4034b by Larry Ullman

Edited intro

parent 7d8ae761
Behaviors Behaviors
========= =========
Behaviors are instances of [[yii\base\Behavior]] or its child class. Behaviors, also known Behaviors are instances of [[yii\base\Behavior]], or of a child class. Behaviors, also known
as [mixins](http://en.wikipedia.org/wiki/Mixin), allow you to enhance the functionality as [mixins](http://en.wikipedia.org/wiki/Mixin), allow you to enhance the functionality
of an existing [[yii\base\Component|component]] class without the need of changing its class inheritance. of an existing [[yii\base\Component|component]] class without needing to change the class's inheritance.
When a behavior is attached to a component, it will "inject" its methods and properties into the component, Attaching a behavior to a component "injects" the behavior's methods and properties into the component, making those methods and properties accessible as if they were defined in the component class itself. Moreover, a behavior
and you can access these methods and properties as if they are defined by the component class. Moreover, a behavior can respond to the [events](concept-events.md) triggered by the component, which allows behaviors to also customize the normal
can respond to the [events](concept-events.md) triggered by the component so that it can customize or adapt the normal
code execution of the component. code execution of the component.
......
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