function sharerich_field_formatter_settings_form in Sharerich 7.3
Same name and namespace in other branches
- 7.2 sharerich.module \sharerich_field_formatter_settings_form()
Pseudo hook_field_formatter_settings_form().
1 call to sharerich_field_formatter_settings_form()
File
- ./
sharerich.module, line 722
Code
function sharerich_field_formatter_settings_form($build, $sharerich_id, $field_name, $summary = NULL) {
$display_stored = field_bundle_settings($build['#entity_type'], $build['#bundle']);
if (!empty($summary)) {
$display['settings'] = $summary;
}
elseif (isset($display_stored['extra_fields']['display'][$field_name][$build['#view_mode']])) {
$display = $display_stored['extra_fields']['display'][$field_name][$build['#view_mode']];
}
else {
$display_defaults = sharerich_field_extra_fields($sharerich_id);
$display = $display_defaults['extra_fields']['display'][$field_name];
}
$form['sharerich_sets'] = array(
'#type' => 'select',
'#title' => t('Sharerich set'),
'#default_value' => !empty($display['settings']['sharerich_sets']) ? $display['settings']['sharerich_sets'] : '',
'#options' => _sharerich_get_sets(),
'#description' => t('Note: Disabled sets are not listed.'),
);
return $form;
}