function FieldTestHooks::fieldUiPreconfiguredOptionsAlter

Implements hook_field_ui_preconfigured_options_alter().

File

core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php, line 125

Class

FieldTestHooks
Hook implementations for field_test.

Namespace

Drupal\field_test\Hook

Code

public function fieldUiPreconfiguredOptionsAlter(array &$options, $field_type) {
    if ($field_type === 'test_field_with_preconfigured_options') {
        $options['custom_options']['entity_view_display']['settings'] = [
            'test_formatter_setting_multiple' => 'altered dummy test string',
        ];
    }
}

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