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: 22Questions: 8Answers: 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: 2,355Questions: 76Answers: 339
    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: 22Questions: 8Answers: 0

    Thanks

Sign In or Register to comment.