The \Drupal\Core\Field\FormatterInterface 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
Settings can be used to alter how the formatter displays information. For example, these methods can be implemented to provide settings to hide or display the first or last name.