You are here

function field_third_party_test_field_formatter_third_party_settings_form in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module \field_third_party_test_field_formatter_third_party_settings_form()
  2. 9 core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module \field_third_party_test_field_formatter_third_party_settings_form()

Implements hook_field_formatter_third_party_settings_form().

File

core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module, line 36
Test module.

Code

function field_third_party_test_field_formatter_third_party_settings_form(FormatterInterface $plugin, FieldDefinitionInterface $field_definition, $view_mode, $form, FormStateInterface $form_state) {
  $element['field_test_field_formatter_third_party_settings_form'] = [
    '#type' => 'textfield',
    '#title' => t('3rd party formatter settings form'),
    '#default_value' => $plugin
      ->getThirdPartySetting('field_third_party_test', 'field_test_field_formatter_third_party_settings_form'),
  ];
  return $element;
}