10

I need to know which event is most probably the last one triggered in normal application flow.

The Event should be triggered after all default controller actions have been run, the template is rendered and possibly already delivered and the next step in the application would be its own shutdown.

I found the events:

  • onAfterRoute
  • onAfterDispatch

But is there another one, called later?

Thanks in Ahead!

EDIT

During development I switched on the debug mode of Joomla! and on the Screenshoot below the answer to my question appeared even coloured…

enter image description here

  • 2
    Good question. It would be nice if they has specified somewhere on the plugin event docs which order they get triggered in – Lodder Dec 14 '14 at 13:20
7

I've found them to fire in this order. Nothing in the docs to my knowledge, but just tested to confirm:

  1. onAfterInitialise()
  2. onAfterRoute()
  3. onAfterDispatch()
  4. onBeforeRender()
  5. onBeforeCompileHead()
  6. onAfterRender()
  • +1, just out of curiosity, how did you test them? – Lodder Dec 14 '14 at 16:33
  • 1
    In each of the events of the plugin I put echo '<pre>'.__METHOD__.'</pre>'. – GDP Dec 14 '14 at 16:39
  • 1
    Thanks a lot, your answer helped me a lot! Have a look at my edit, I found that on the way… – philipp Dec 15 '14 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.