function phone_link_field_formatter_settings_summary in Phone link 7
Implements hook_field_formatter_settings_summary().
File
- ./
phone_link.module, line 55
Code
function phone_link_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
if (!empty($settings['title'])) {
$summary[] = t('Title attribute: @title', array(
'@title' => $settings['title'],
));
}
else {
$summary[] = t('No title attribute.');
}
if (!empty($settings['text'])) {
$summary[] = t('Text: @text', array(
'@text' => $settings['text'],
));
}
else {
$summary[] = t('No text replacement.');
}
if (!empty($settings['type'])) {
$types = _phone_link_get_phone_types();
$summary[] = t('Phone link type: @type', [
'@type' => $types[$settings['type']],
]);
}
return implode('<br />', $summary);
}