How to execute a function from an external class from an editor event

How to execute a function from an external class from an editor event

itramitram Posts: 43Questions: 15Answers: 0

how to execute a php function from another class (included in the main page) from an editor event:
something similiar to below :

->on('postEdit', function ($editor, $id, $values, $row) {
             $myclass->$myfunction($myparam);
}

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

This question has an accepted answers - jump to answer

Answers

  • rf1234rf1234 Posts: 3,021Questions: 88Answers: 421
    Answer ✓
    ....
    ->on('postEdit', function ($editor, $id, $values, $row) use ($myclass, $myparam) {
        $myclass->$myfunction($myparam);
    }
    

    If that is required at all. Just give it a try. You can also use "global".

  • itramitram Posts: 43Questions: 15Answers: 0

    Thanks

Sign In or Register to comment.