function diff_get_field_settings in Diff 7.3
Helper function to get the settings for a given field or formatter.
Parameters
array $field_context: This will get the settings for a field.
- field (required): The field that the items belong to.
- entity: The entity that we are looking up.
- instance: The instance that the items belong to.
- view_mode: The view mode to use. Defaults to FALSE.
Return value
array The settings for this field type.
1 call to diff_get_field_settings()
- diff_entity_fields_diff in ./
diff.diff.inc - Internal callback to handle fieldable entities.
File
- ./
diff.diff.inc, line 234 - Includes the hooks defined by diff_hook_info().
Code
function diff_get_field_settings($field_context) {
$field = $field_context['field'];
// Update saved settings from the global settings for this field type.
$settings = variable_get("diff_{$field['module']}_field_{$field['type']}_default_options", array());
$settings = _diff_field_default_settings($field['module'], $field['type'], $settings);
// Allow modules to alter the field settings based on the current context.
drupal_alter('diff_field_settings', $settings, $field_context);
return $settings;
}