When to use init(), preprocess() and prerender()
In this thread, Craig suggests asking yourself the following questions:
- Do I need the results of this computation in order to process a form submit?
- Do I need the results of this computation in order to render the page?
Use init() for (1) and (2)
Use preprocess() for (1) only
Use prerender() for (2) only