function field_info_formatter_settings in Drupal 7
Returns a field formatter's default settings.
Parameters
$type: A field formatter type name.
Return value
The formatter type's default settings, as provided by hook_field_formatter_info(), or an empty array if type or settings are undefined.
Related topics
8 calls to field_info_formatter_settings()
- FieldDisplayAPITestCase::testFieldViewField in modules/
field/ tests/ field.test - Test the field_view_field() function.
- FieldDisplayAPITestCase::testFieldViewValue in modules/
field/ tests/ field.test - Test the field_view_value() function.
- FieldInfo::prepareInstanceDisplay in modules/
field/ field.info.class.inc - Adapts display specifications to the current run-time context.
- FieldInfoTestCase::testSettingsInfo in modules/
field/ tests/ field.test - Test that the field_info settings convenience functions work.
- FieldUIManageDisplayTestCase::testFormatterUI in modules/
field_ui/ field_ui.test - Tests formatter settings.
File
- modules/
field/ field.info.inc, line 793 - Field Info API, providing information about available fields and field types.
Code
function field_info_formatter_settings($type) {
$info = field_info_formatter_types($type);
return isset($info['settings']) ? $info['settings'] : array();
}