function sharerich_field_formatter_settings_summary in Sharerich 7.2
Same name and namespace in other branches
- 7.3 sharerich.module \sharerich_field_formatter_settings_summary()
Pseudo hook_field_formatter_settings_summary().
1 call to sharerich_field_formatter_settings_summary()
File
- ./
sharerich.module, line 788
Code
function sharerich_field_formatter_settings_summary($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];
}
$summary = array();
if (!empty($display['settings']['sharerich_sets'])) {
$summary[] = t('Sharerich set') . ': ' . $display['settings']['sharerich_sets'];
}
else {
$summary[] = t('No set selected.');
}
return implode('<br />', $summary);
}