function flag_lists_user_list in Flag Lists 7
Same name and namespace in other branches
- 6 flag_lists.module \flag_lists_user_list()
- 7.3 flag_lists.module \flag_lists_user_list()
List the contents of a user-defined list
2 string references to 'flag_lists_user_list'
- flag_lists_menu in ./
flag_lists.module - Implementation of hook_menu().
- flag_lists_views_default_views in includes/
flag_lists.views_default.inc - Implementation of hook_views_default_views().
File
- ./
flag_lists.module, line 186 - The Flag Lists module.
Code
function flag_lists_user_list($user, $fid) {
$uid = $user->uid;
// Can we use our default view?
if (module_exists('views')) {
$view = views_get_view('flag_lists_user_list', FALSE);
if (!empty($view)) {
$view
->set_display('default');
$view
->set_arguments(array(
$fid,
));
$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_list', array(
'uid' => $uid,
'fid' => $fid,
));
}
}