Hooks that cascade in hooks

Often code in one hook’s before and after events, calls a function that triggers another hook’s before and after events. As logic becomes more complex, we have noted that these cascading hook events, can actually effect the outcome of what the code is trying to achieve.

It would be a nice feature to be able to call e.g. page.update and tell it not to trigger its before and after hooks.

What you can do for example, is use $page->save() instead of $page->update().

1 Like