public function beforeValidate() { if (!$this->expires) { $this->expires = strtotime(Yii::$app->params['user']['reset_timeout']); } return parent::beforeValidate(); }
public function beforeValidate() { if (empty($this->stock)) { $this->stock = 0; } if (empty($this->featured)) { $this->featured = 0; } return parent::beforeValidate(); // TODO: Change the autogenerated stub }