function double_field_field_formatter_settings_summary in Double Field 7
Same name and namespace in other branches
- 7.2 double_field.module \double_field_field_formatter_settings_summary()
Implements hook_field_formatter_settings_summary().
File
- ./
double_field.module, line 275 - Defines double text field type.
Code
function double_field_field_formatter_settings_summary($field, $instance, $view_mode) {
$settings = $instance['display'][$view_mode]['settings'];
$summary = '';
if ($instance['display'][$view_mode]['type'] == 'double_field_fieldset') {
$summary .= '<div>Collapsible: <em>' . ($settings['collapsible'] ? 'Yes' : 'No') . '</em></div>';
$summary .= '<div>Collapsed: <em>' . ($settings['collapsed'] ? 'Yes' : 'No') . '</em></div>';
}
if ($settings['first']['prefix']) {
$summary .= '<div>First prefix: <em>' . check_plain($settings['first']['prefix']) . '</em></div>';
}
if ($settings['first']['suffix']) {
$summary .= '<div>First suffix: <em>' . check_plain($settings['first']['suffix']) . '</em></div>';
}
if ($settings['second']['prefix']) {
$summary .= '<div>Second prefix: <em>' . check_plain($settings['second']['prefix']) . '</em></div>';
}
if ($settings['second']['suffix']) {
$summary .= '<div>Second suffix: <em>' . check_plain($settings['second']['suffix']) . '</em></div>';
}
return $summary;
}