1 system.api.php | hook_boot() |
Perform setup tasks for all page requests.
This hook is run at the beginning of the page request. It is typically used to set up global parameters that are needed later in the request.
If needing to execute code early in the page request, consider using hook_init() instead. In hook_boot(), only the most basic APIs are available and not all modules have been loaded. This hook by default is not called on pages served by the default page cache, but can be enabled through the $settings['page_cache_invoke_hook'] option in settings.php.
See also
Related topics
File
- core/
modules/ system/ system.api.php, line 1459 - Hooks provided by Backdrop core and the System module.
Code
function hook_boot() {
// We need user_access() in the shutdown function. Make sure it gets loaded.
backdrop_load('module', 'user');
backdrop_register_shutdown_function('devel_shutdown');
}