To discuss or ask questions about this article, select the discussion tab above.
Here is an example of trigger (call method convert_request with one parameter): <source lang="text"> POST_VALIDATE convert_request( persistent_id ) 96 FILTER(EVENT("INSERT")); </source>
You can define new methods on every object. This definition must be in file with SPL extension in $NX_ROOT/site/mods/majic folder. In one file you can define more than one method and even for more than one class.
} </source> Use method definition with (...) even if no parameters are expected.
Parameters are passed into the method in argv array. Each parameters are in triplets. Here is the explanation of argv values:
- argv - number of parameters
- argv - name of the first parameter
- argv - previous value of the first parameter
- argv - actual value of the first parameter
- argv - name of the second parameter
- argv - previous value of the second parameter
- argv - actual value of the second parameter
and so on
If you want to override some built-in method, simply define method with the same name (object::methodName) and write your new body.