Exit gracefully from Editor's PHP preRemove function
Exit gracefully from Editor's PHP preRemove function
Hi,
I am using PHP libraries for Editor. I am using the 'on preRemove' function to run some checks before the delete (remove) actually occurs, and in some cases i want to exit back to the caller gracefully WITHOUT actually performing the delete.
Is this possible?
Richard
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi Richard,
At the moment the events are just notifications of what is going to happen, or what has happened. There is no way to prevent the execution of the delete from the
preRemove
callback at this time (although that is a sensible idea and I've added it to my list).At the moment you would need to check if you want the delete to happen before you call the
Editor->process()
method.Allan
Thanks Allan, I thought that might be the case :) I will go ahead and try your suggestion which is similar to what i was testing already.
Thanks for adding to your list, i think it would be a useful option :)
-R