function field_info_widget_settings

Returns a field widget's default settings.

Parameters

$type: A widget type name.

Return value

The widget type's default settings, as provided by hook_field_widget_info(), or an empty array if type or settings are undefined.

Related topics

3 calls to field_info_widget_settings()
EntityFormDisplayTest::testFieldComponent in drupal/core/modules/entity/lib/Drupal/entity/Tests/EntityFormDisplayTest.php
Tests the behavior of a field component within an EntityFormDisplay object.
FieldInfoTest::testSettingsInfo in drupal/core/modules/field/lib/Drupal/field/Tests/FieldInfoTest.php
Test that the field_info settings convenience functions work.
WidgetPluginManager::prepareConfiguration in drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
Merges default values for widget configuration.

File

drupal/core/modules/field/field.info.inc, line 525
Field Info API, providing information about available fields and field types.

Code

function field_info_widget_settings($type) {
  $info = field_info_widget_types($type);
  return isset($info['settings']) ? $info['settings'] : array();
}