inspirenmy/yii2-behaviors

Yii2 behaviors library

Installs: 949

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

Type:yii2-extension

1.0.1 2017-09-21 05:57 UTC

This package is not auto-updated.

Last update: 2020-08-08 05:40:23 UTC


README

#Yii2 behaviors library ##Description Yii2 behaviors library which used in web-application development.

##Composition ###SanitizeBehavior

Sanitize model string attributes (all string attributes by default). You can exclude some fields or allow some html tags.

#####Usage:

// in model ActiveRecord
public function behaviors()
{
    return [
        SanitizeBehavior::className(),
    ];
}

###TimestampBehavior Extends standard yii class to use with not required attributes.

#####Usage:

// in model ActiveRecord
public function behaviors()
{
    return [
        TimestampBehavior::className(),
    ];
}