function flag_lists_user_page in Flag Lists 7
Same name and namespace in other branches
- 6 flag_lists.module \flag_lists_user_page()
- 7.3 flag_lists.module \flag_lists_user_page()
User flag page. Display a list of user-created flag lists.
1 call to flag_lists_user_page()
- flag_lists_block_view in ./
flag_lists.module - Implements hook_block_view().
1 string reference to 'flag_lists_user_page'
- flag_lists_menu in ./
flag_lists.module - Implementation of hook_menu().
File
- ./
flag_lists.module, line 147 - The Flag Lists module.
Code
function flag_lists_user_page($user) {
// Can we use our default view?
if (module_exists('views')) {
$view = views_get_view('flag_lists_user_lists', FALSE);
if (!empty($view)) {
$view
->set_display('default');
$view
->set_arguments(array(
$user->uid,
));
$output = $view
->render();
drupal_set_title(str_replace(array_keys($view->build_info['substitutions']), $view->build_info['substitutions'], $view->build_info['title']));
}
return $output;
}
else {
return theme('flag_lists_user_page', array(
'uid' => $user->uid,
));
}
}