So I discovered in this topic (
) that I can cancel all hooks after my own hook. Now I want something like that.
I want my hook which is called on page render to cancel all other events, also the after page render and the before page render methods, is this possible?
This only need to be done when some conditions are met.
/** method replaces original page::render method and is called with hook priority one */
method onPageRender (HookEvent $event)
{
if (my condition is true) {
$this->cancelHooks = true; // to cancel all hooks to page::render
// how to cancel after Page::render events
// how to cancel before Page::render events
}
}
Is this possible at all?