li3_behaviors\data\model\Behaviors::hasBehavior()

public static method

Allows to check if a certain behavior is bound to the model.

Parameters

  • string $name

    The name of the behavior.

Returns

boolean

Source

	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]);
	}