public function TestFieldWidget::settingsForm

Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::settingsForm().

Overrides WidgetBase::settingsForm

File

drupal/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/field/widget/TestFieldWidget.php, line 35
Definition of Drupal\field_test\Plugin\field\widget\TestFieldWidget.

Class

TestFieldWidget
Plugin implementation of the 'test_field_widget' widget.

Namespace

Drupal\field_test\Plugin\field\widget

Code

public function settingsForm(array $form, array &$form_state) {
  $element['test_widget_setting'] = array(
    '#type' => 'textfield',
    '#title' => t('Field test field widget setting'),
    '#description' => t('A dummy form element to simulate field widget setting.'),
    '#default_value' => $this
      ->getSetting('test_widget_setting'),
    '#required' => FALSE,
  );
  return $element;
}