inspirenmy/yii2-behaviors

Yii2 behaviors library

Installs: 952

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Type:yii2-extension

1.0.1 2017-09-21 05:57 UTC

This package is not auto-updated.

Last update: 2024-11-10 06:22:53 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(),
    ];
}