original_string: public function delete()
      {
          if ($this->isNewRecord()) {
              throw new DeleteModelException("New models can't be deleted.");
          }
  
          $this->beforeDelete();
          $this->raiseEvent("BeforeDelete");
  
          $this->Deleted = true;
          $this->save();
  
          $this->afterDelete();
          $this->raiseEvent("AfterDelete");
      }
code: public function delete()
      {
          if ($this->isNewRecord()) {
              throw new DeleteModelException("New models can't be deleted.");
          }
  
          $this->beforeDelete();
          $this->raiseEvent("BeforeDelete");
  
          $this->Deleted = true;
          $this->save();
  
          $this->afterDelete();
          $this->raiseEvent("AfterDelete");
      }
code_tokens: public function delete ( ) { if ( $ this -> isNewRecord ( ) ) { throw new DeleteModelException ( "New models can't be deleted." ) ; } $ this -> beforeDelete ( ) ; $ this -> raiseEvent ( "BeforeDelete" ) ; $ this -> Deleted = true ; $ this -> save ( ) ; $ this -> afterDelete ( ) ; $ this -> raiseEvent ( "AfterDelete" ) ; }
docstring: Replaces the standard delete by flagging the entry deleted instead.
docstring_tokens: Replaces the standard delete by flagging the entry deleted instead .