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;
        }
    }
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;
        }
    }
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 ; } }
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
AJAX handler onDelete called from the update action and used for deleting existing records .