function TestItem::fieldSettingsFromConfigData

Same name in other branches
  1. 9 core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php \Drupal\field_test\Plugin\Field\FieldType\TestItem::fieldSettingsFromConfigData()
  2. 10 core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php \Drupal\field_test\Plugin\Field\FieldType\TestItem::fieldSettingsFromConfigData()
  3. 11.x core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php \Drupal\field_test\Plugin\Field\FieldType\TestItem::fieldSettingsFromConfigData()

Overrides FieldItemBase::fieldSettingsFromConfigData

File

core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php, line 167

Class

TestItem
Defines the 'test_field' entity field item.

Namespace

Drupal\field_test\Plugin\Field\FieldType

Code

public static function fieldSettingsFromConfigData(array $settings) {
    $settings['field_setting_from_config_data'] = 'TRUE';
    unset($settings['config_data_from_field_setting']);
    return $settings;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.