Stop Saving Model From Cactiverecordbehavior

Is it possible to stop saving a model from a CActiveRecordBehavior????

for example


class RepeaterBehavior extends CActiveRecordBehavior {        

    public function beforeSave($event) {

       if ($condition == true) {

           // stop saving the model




I’ve tried returning false but the model still saving thanks

please help

one thing you have to run the parent::baforeSave() so it runs thru the whole chain and please paste your actual code

$event->isValid = false;


Thank you is exactly what Im looking for.