function hook_redirect_load_alter in Redirect 7
Same name and namespace in other branches
- 7.2 redirect.api.php \hook_redirect_load_alter()
Act on redirects being loaded from the database.
This hook is invoked during redirect loading, which is handled by entity_load(), via classes RedirectController and DrupalDefaultEntityController. After the redirect information is read from the database or the entity cache, hook_entity_load() is invoked on all implementing modules, and then hook_redirect_load() is invoked on all implementing modules.
This hook should only be used to add information that is not in the redirect table, not to replace information that is in that table (which could interfere with the entity cache). For performance reasons, information for all available redirects should be loaded in a single query where possible.
The $types parameter allows for your module to have an early return (for efficiency) if your module only supports certain redirect types.
Parameters
$redirects: An array of the redirects being loaded, keyed by rid.
$types: An array containing the types of the redirects.
Related topics
1 invocation of hook_redirect_load_alter()
- redirect_load in ./
redirect.module - Load an URL redirect from the database.
File
- ./
redirect.api.php, line 81 - Hooks provided by the Redirect module.
Code
function hook_redirect_load_alter($redirects) {
}