src/FormField/Upload.php
public function onDelete($fx = null)
    {
        if (is_callable($fx)) {
            $this->hasDeleteCb = true;
            if ($this->cb->triggered() && @$_POST['action'] === 'delete') {
                $fileName = @$_POST['f_name'];
                $this->cb->set(function () use ($fx, $fileName) {
                    $this->addJsAction(call_user_func_array($fx, [$fileName]));

                    return $this->jsActions;
                });
            }
        }
    }
public function onDelete($fx = null)
    {
        if (is_callable($fx)) {
            $this->hasDeleteCb = true;
            if ($this->cb->triggered() && @$_POST['action'] === 'delete') {
                $fileName = @$_POST['f_name'];
                $this->cb->set(function () use ($fx, $fileName) {
                    $this->addJsAction(call_user_func_array($fx, [$fileName]));

                    return $this->jsActions;
                });
            }
        }
    }
public function onDelete ( $ fx = null ) { if ( is_callable ( $ fx ) ) { $ this -> hasDeleteCb = true ; if ( $ this -> cb -> triggered ( ) && @ $ _POST [ 'action' ] === 'delete' ) { $ fileName = @ $ _POST [ 'f_name' ] ; $ this -> cb -> set ( function ( ) use ( $ fx , $ fileName ) { $ this -> addJsAction ( call_user_func_array ( $ fx , [ $ fileName ] ) ) ; return $ this -> jsActions ; } ) ; } } }
onDelete callback.
Call when user is removing an already upload file.

@param callable $fx
onDelete callback . Call when user is removing an already upload file .