function link_image_formatter_settings in Link Image Formatter 6
Settings form for link display image type formatter.
1 call to link_image_formatter_settings()
- link_image_content_display_form in ./
link_image.module - Alter content display form to include extra data for link image type formatter.
File
- ./
link_image.module, line 225
Code
function link_image_formatter_settings($form_state = NULL, $field, $options = array()) {
$field_name = $field['field_name'];
$field = content_fields($field_name);
$type_name = isset($options['type_name']) ? $options['type_name'] : $field['type_name'];
$context = isset($options['context']) ? $options['context'] : 'full';
if (empty($options['width'])) {
$options = _link_image_formatter_get_settings($field_name, $type_name, $context);
}
$form['width'] = array(
'#type' => 'textfield',
'#title' => t('Width'),
'#default_value' => !empty($options['width']) ? $options['width'] : '',
'#description' => t('Enter a width in pixels. Leave blank for default.'),
);
$form['height'] = array(
'#type' => 'textfield',
'#title' => t('Height'),
'#default_value' => !empty($options['height']) ? $options['height'] : '',
'#description' => t('Enter a height in pixels. Leave blank for default.'),
);
$form['field'] = array(
'#type' => 'value',
'#value' => $field,
);
$form['type_name'] = array(
'#type' => 'value',
'#value' => $type_name,
);
$form['context'] = array(
'#type' => 'value',
'#value' => $context,
);
return $form;
}