The \Drupal\Core\Field\WidgetInterface interface defines three methods that can be overridden to provide a settings form and a summary of the current settings:
- defaultSettings: This returns an array of the setting keys and default values
- settingsForm: This returns a Form API array that is used for the settings form
- settingsSummary: This allows an array of strings to be returned and displayed on the manage display form for the field
Widget settings can be used to alter the form presented to the user. A setting can be created that allows the field element to be limited to only enter the first or last name with one text field.