original_string: public function update_onDelete($recordId = null)
      {
          $this->context = $this->getConfig('update[context]', self::CONTEXT_UPDATE);
          $model = $this->controller->formFindModelObject($recordId);
          $this->initForm($model);
  
          $model->delete();
  
          $this->controller->formAfterDelete($model);
  
          Flash::success($this->getLang("{$this->context}[flashDelete]", 'backend::lang.form.delete_success'));
  
          if ($redirect = $this->makeRedirect('delete', $model)) {
              return $redirect;
          }
      }
code: public function update_onDelete($recordId = null)
      {
          $this->context = $this->getConfig('update[context]', self::CONTEXT_UPDATE);
          $model = $this->controller->formFindModelObject($recordId);
          $this->initForm($model);
  
          $model->delete();
  
          $this->controller->formAfterDelete($model);
  
          Flash::success($this->getLang("{$this->context}[flashDelete]", 'backend::lang.form.delete_success'));
  
          if ($redirect = $this->makeRedirect('delete', $model)) {
              return $redirect;
          }
      }
code_tokens: public function update_onDelete ( $ recordId = null ) { $ this -> context = $ this -> getConfig ( 'update[context]' , self :: CONTEXT_UPDATE ) ; $ model = $ this -> controller -> formFindModelObject ( $ recordId ) ; $ this -> initForm ( $ model ) ; $ model -> delete ( ) ; $ this -> controller -> formAfterDelete ( $ model ) ; Flash :: success ( $ this -> getLang ( "{$this->context}[flashDelete]" , 'backend::lang.form.delete_success' ) ) ; if ( $ redirect = $ this -> makeRedirect ( 'delete' , $ model ) ) { return $ redirect ; } }
docstring: AJAX handler "onDelete" called from the update action and
  used for deleting existing records.
  
  This handler will invoke the unique controller override
  `formAfterDelete`.
  
  @param int $recordId Record identifier
  @return mixed
docstring_tokens: AJAX handler onDelete called from the update action and used for deleting existing records .