/**
  * Prepares attributes before performing validation.
  */
 protected function beforeValidate()
 {
     parent::beforeValidate();
     if ($this->isNewRecord) {
         $this->status = $this->swBehavior->swGetStatus()->toString();
     }
     return true;
 }