You are here

function flag_lists_user_list in Flag Lists 6

Same name and namespace in other branches
  1. 7.3 flag_lists.module \flag_lists_user_list()
  2. 7 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 173
The Flag Lists module.

Code

function flag_lists_user_list($uid, $fid) {

  // 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($view->build_info['title']);
    }
    return $output;
  }
  else {
    return theme('flag_lists_user_list', $uid, $fid);
  }
}