performDeleteOnModel() protected method

Perform the actual delete query on this model instance.
protected performDeleteOnModel ( ) : void
return void
Esempio n. 1
0
 /**
  * 复写系统方法
  * @return void
  */
 protected function performDeleteOnModel()
 {
     $e = get_called_class() . 'DeleteFailException';
     # 拓展软删除事件监听
     if ($this->softDelete) {
         if ($this->fireModelEvent('softing') === false) {
             throw new $e();
         }
         parent::performDeleteOnModel();
         $this->fireModelEvent('softed', false);
     } else {
         if ($this->fireModelEvent('forcing') === false) {
             throw new $e();
         }
         parent::performDeleteOnModel();
         $this->fireModelEvent('forced', false);
     }
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 protected function performDeleteOnModel()
 {
     parent::performDeleteOnModel();
     EntityTrait::clearAttributesCache();
 }