I’m new to TP Add-on development and I am confused as to why there is an “element” parameter for the
execute method of the various
XxxElementAction interfaces, but we’re told not to use it! Instead, we’re instructed to copy-paste the same bit of code,
helper.getSearchCriteria() (plus error handling) into each and every action body, but it’s not explained why (that I’ve found, either here or in the one page of docs).
If it’s the same code every time, why not do the call in the framework and pass the value — as one would expect, looking at the interface? Maybe there’s a good reason, but to me, this goes against the principle of least surprise, so this is a case where it would be really helpful if the documentation provided some explanation.