public static function isAttachedTo($model)
	{
		if ( $model instanceof  yii\base\Component) {
			foreach ($model->getBehaviors() as $behavior) {
				if ($behavior instanceof SimpleWorkflowBehavior) {
					return true;
				}
			}
		} else {
			throw new WorkflowException('Invalid argument type : $model must be a BaseActiveRecord');
		}
		return false;
	}
public static function isAttachedTo($model)
	{
		if ( $model instanceof  yii\base\Component) {
			foreach ($model->getBehaviors() as $behavior) {
				if ($behavior instanceof SimpleWorkflowBehavior) {
					return true;
				}
			}
		} else {
			throw new WorkflowException('Invalid argument type : $model must be a BaseActiveRecord');
		}
		return false;
	}
public static function isAttachedTo ( $ model ) { if ( $ model instanceof yii \ base \ Component ) { foreach ( $ model -> getBehaviors ( ) as $ behavior ) { if ( $ behavior instanceof SimpleWorkflowBehavior ) { return true ; } } } else { throw new WorkflowException ( 'Invalid argument type : $model must be a BaseActiveRecord' ) ; } return false ; }
Tests that a `SimpleWorkflowBehavior` behavior is attached to the object passed as argument.

This method returns FALSE if $model is not an instance of yii\base\Component  or if none of its
attached behaviors is a or inherit from SimpleWorkflowBehavior.

@param BaseActiveRecord $model the model to test.
@return boolean TRUE if at least one SimpleWorkflowBehavior behavior is attached to $model, FALSE otherwise
Tests that a SimpleWorkflowBehavior behavior is attached to the object passed as argument .