function _me_load_arguments in me aliases 6
Same name and namespace in other branches
- 8 me.module \_me_load_arguments()
- 6.2 me.module \_me_load_arguments()
- 7 me.module \_me_load_arguments()
Helper function to set up arguments in meun _load callbacks.
3 calls to _me_load_arguments()
- me_category_load in ./
me.module - Menu load callback in place of user_category_load().
- me_load in ./
me.module - Menu load callback in place of user_load().
- me_uid_optional_load in ./
me.module - Menu load callback in place of user_uid_optional_load().
File
- ./
me.module, line 342 - Provides 'me' aliases to allow users to enter 'me' in common paths instead of their user id.
Code
function _me_load_arguments($uid, &$map = NULL, $index = NULL, $map_index = FALSE, $args = array(), $function = 'user_load') {
// We need to get all the arguments, remove our custom ones,
// put %map in the right place, then call the menu load callack.
array_splice($args, 0, min(4, count($args)));
if (!is_null($map) && FALSE !== $map_index) {
$insert = array(
&$map,
);
array_splice($args, $map_index, 0, $insert);
$map[$index] = _me_check_arg($uid);
}
array_unshift($args, _me_check_arg($uid));
// If we have a valid function to call, call it.
if (function_exists($function)) {
return call_user_func_array($function, $args);
}
return FALSE;
}