Defining Behaviors Handling Component Events Attaching Behaviors Using Behaviors Detaching Behaviors Using TimestampBehavior Other behaviors Comparing Behaviors with Traits
Behaviors are instances of yii\base\Behavior, or of a child class. Behaviors, also known as mixins, allow you to enhance the functionality of an existing component class without needing to change the class's inheritance. Attaching a behavior to a component "injects" the behavior's methods and properties into the component,