Ejemplo n.º 1
0
 /**
  * @return bool
  */
 protected function validate()
 {
     #region チェック対象
     if ($this->mode == 'update') {
         if (!$this->record) {
             $this->addError('system', 'パラメータが不正です');
             return false;
         }
         $group = $this->record->getGroup();
     } else {
         $group = $this->record->getGroup(false);
     }
     #endregion
     if (!$this->record->isValid($group)) {
         $this->setError($this->record->getErrors());
         return false;
     } else {
         return true;
     }
 }
 /**
  * @return bool
  */
 protected function _exec()
 {
     return $this->record->delete() === 1;
 }