Overview of how a page request is processed
From CaravelWiki
Here is the main flow of execution when loading a Caravel page.
- index.php
- Caravel_HTTP::create
- Caravel_HTTP::parseRequest
- Caravel_HTTP::login_logout
- Caravel_HTTP::displayFile (if downloading a file)
- Site::loadByPath
- Site::load
- Site::getExternals
- Site::validateSiteDNAndSectionPath
- Site::initPrivs
- Site::getButtonRows
- Site::execAdminParams
- --> various site operations
- Section::create
- Section::initPrivs
- Section::loadTemplate
- Section::fetchBlocksList
- Block::create (for each block)
- Section::loadDynamicBlocks
- Block::create (for each block)
- Section::checkModifiedBlocks
- Section::execAdminParams
- --> various section (page) operations
- Block::startApp (for each block)
- App::init
- App::initPrivs
- App::getSettingsVars
- App::getSiteVars
- (App)::onInit
- (App)::onSave
- App::init
- Site::load
- Display::create
- Caravel_HTTP::get
- Display::get
- Display::getRSS (if format=rss)
- for single block mode:
- App::init
- App::getAllHeaders
- (handle cv_widgets)
- App::getAjax (if requested via ajax)
- App::dispatch
- (print javascript to close window, and exit, if user clicked Save & Close)
- (App)::getConfig (if in edit mode)
- (App)::getContent (if in preview mode)
- App::getContent (for extension blocks, e.g. Comments)
- (display errors)
- for normal mode:
- Section::getHeader
- SideBar::getContent
- Site::getContent
- Section::getContent
- (handle publishing, if called from the publishing functions in Site)
- Section::getRowsHTML (for the template)
- (similar to below when the same function is run to get the content area)
- Block::getContent (if loading a single block, with navigation)
- Section::getSnapshot (if loading a published page)
- Section::getRowsHTML (for the page itself -- if not loading a published page)
- Block::getRescue (for each block -- if in rescue mode)
- Block::getContent (for each block -- if NOT in rescue mode)
- (redirect to login if login is required for this block)
- (App)::dispatch
- (print javascript to close window, and exit, if user clicked Save & Close)
- (App)::getConfig (if in edit mode)
- (App)::getContent (if in preview mode)
- Block::getContent (for any block extensions, e.g. Comments)
- Section::getToolbar (for each of various toolbars)
- (generate the footer)
- Section::getContent
- Section::getToolbar
- (display errors)
- (display debug info)
- Display::get
- Caravel_HTTP::create
