li3_behaviors\data\model\Behaviors::hasBehavior()
Allows to check if a certain behavior is bound to the model.
Parameters
-
string
$name
The name of the behavior.
Returns
booleanSource
public static function hasBehavior($name) {
static::_initializeBehaviors();
try {
list($model, $class) = static::_classesForBehavior($name);
} catch (Exception $e) {
return false;
}
return isset(static::$_behaviors[$model][$class]);
}