li3_behaviors\data\model\Behaviors::bindBehavior()
Binds a new instance of a behavior to the model using given config or entirely replacing an existing behavior instance with new config.
Parameters
-
string
$name
The name of the behavior.
-
array
$config
Configuration for the behavior instance.
Source
public static function bindBehavior($name, array $config = []) {
list($model, $class) = static::_classesForBehavior($name);
static::$_behaviors[$model][$class] = new $class($config + compact('model'));
}