You are here

function sexybookmarks_field_formatter_settings_form in Share Buttons, Related Posts, Content Analytics - Shareaholic 7

Same name and namespace in other branches
  1. 7.2 includes/field_ui.inc \sexybookmarks_field_formatter_settings_form()

Implements hook_field_formatter_settings_form().

File

includes/field_ui.inc, line 48
Field UI module integration.

Code

function sexybookmarks_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $element = array();
  $options = array();
  ctools_include('export');
  foreach (ctools_export_crud_load_all('sexybookmarks_profiles') as $profile) {
    if (empty($profile->disabled)) {
      $options[$profile->name] = $profile->name;
    }
  }
  $element['sexybookmarks_profile'] = array(
    '#type' => 'select',
    '#title' => t('SexyBookmarks profile'),
    '#empty_value' => '',
    '#options' => $options,
    '#default_value' => !empty($display['settings']['sexybookmarks_profile']) ? $display['settings']['sexybookmarks_profile'] : 'default',
  );
  return $element;
}