You are here

function fb_form_group_options in Drupal for Facebook 5

Same name and namespace in other branches
  1. 5.2 fb_form.module \fb_form_group_options()
  2. 6.3 fb_form.module \fb_form_group_options()
  3. 6.2 fb_form.module \fb_form_group_options()
  4. 7.3 fb_form.module \fb_form_group_options()

File

./fb_form.module, line 240
This module defines facebook-specific form elements for use with Drupal's form API.

Code

function fb_form_group_options($fbu) {
  $groups = fb_get_groups_data($fbu);
  $items = array();
  if ($groups && count($groups)) {
    foreach ($groups as $data) {
      $items[$data['gid']] = $data['name'];
    }
  }

  // TODO: alphabetize list
  return $items;
}