Yii2 behaviors library which used in web-application development.
Sanitize model string attributes (all string attributes by default). You can exclude some fields or allow some html tags.
// in model ActiveRecord
public function behaviors()
{
return [
SanitizeBehavior::className(),
];
}
Extends standard yii class to use with not required attributes.
// in model ActiveRecord
public function behaviors()
{
return [
TimestampBehavior::className(),
];
}
Comments