function fb_admin_get_app_options in Drupal for Facebook 6.2
Same name and namespace in other branches
- 6.3 fb.admin.inc \fb_admin_get_app_options()
- 7.3 fb.admin.inc \fb_admin_get_app_options()
Convenience method to return a list of all known apps, suitable for form elements.
3 calls to fb_admin_get_app_options()
- fb_actions_cron_per_user_form in contrib/
fb_actions.module - Implementation of fb_actions_cron_per_user action.
- fb_connect_admin_settings in ./
fb_connect.admin.inc - Form builder; Configure settings for this site.
- fb_user_admin_settings in ./
fb_user.admin.inc - Form builder; Configure settings for this site.
File
- ./
fb.admin.inc, line 196 - Admin pages and forms for Drupal for Facebook.
Code
function fb_admin_get_app_options($include_current = FALSE, $key = 'label') {
$apps = fb_get_all_apps();
$options = array();
if ($include_current) {
$options[FB_APP_CURRENT] = t('<current>');
}
foreach ($apps as $app) {
if ($key == 'apikey') {
$options[$app->apikey] = $app->label;
}
else {
$options[$app->label] = $app->label;
}
}
return $options;
}