Drupal - list of supported value in entity baseFieldDefinitions setDisplayOptions type(field widget)

What you are looking for are the field widget plugins, these depend on what modules you have installed.

Use Drupal Console to run this command:

drupal debug:plugin field.widget

This is what I have on a local site with some contrib modules:

 -------------------------------------------- --------------------------------------------------------------------------------------- 
  Plugin ID                                    Plugin class                                                                           
 -------------------------------------------- --------------------------------------------------------------------------------------- 
  boolean_checkbox                             Drupal\Core\Field\Plugin\Field\FieldWidget\BooleanCheckboxWidget                       
  datetime_datelist                            Drupal\datetime\Plugin\Field\FieldWidget\DateTimeDatelistWidget                        
  datetime_default                             Drupal\datetime\Plugin\Field\FieldWidget\DateTimeDefaultWidget                         
  datetime_timestamp                           Drupal\Core\Datetime\Plugin\Field\FieldWidget\TimestampDatetimeWidget                  
  email_default                                Drupal\Core\Field\Plugin\Field\FieldWidget\EmailDefaultWidget                          
  entity_reference_autocomplete                Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget           
  entity_reference_autocomplete_tags           Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteTagsWidget       
  field_example_3text                          Drupal\field_example\Plugin\Field\FieldWidget\Text3Widget                              
  field_example_colorpicker                    Drupal\field_example\Plugin\Field\FieldWidget\ColorPickerWidget                        
  field_example_text                           Drupal\field_example\Plugin\Field\FieldWidget\TextWidget                               
  field_permission_example_widget              Drupal\field_permission_example\Plugin\Field\FieldWidget\TextWidget                    
  file_generic                                 Drupal\file\Plugin\Field\FieldWidget\FileWidget                                        
  image_image                                  Drupal\image\Plugin\Field\FieldWidget\ImageWidget                                      
  language_select                              Drupal\Core\Field\Plugin\Field\FieldWidget\LanguageSelectWidget                        
  link_default                                 Drupal\link\Plugin\Field\FieldWidget\LinkWidget                                        
  menu_item_extras_view_mode_selector_select   Drupal\menu_item_extras\Plugin\Field\FieldWidget\MenuItemExtrasViewModeSelectorSelect  
  moderation_state_default                     Drupal\content_moderation\Plugin\Field\FieldWidget\ModerationStateWidget               
  number                                       Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget                                
  oembed_textfield                             Drupal\media\Plugin\Field\FieldWidget\OEmbedWidget                                     
  options_buttons                              Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget                        
  options_select                               Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsSelectWidget                         
  path                                         Drupal\path\Plugin\Field\FieldWidget\PathWidget                                        
  string_textarea                              Drupal\Core\Field\Plugin\Field\FieldWidget\StringTextareaWidget                        
  string_textfield                             Drupal\Core\Field\Plugin\Field\FieldWidget\StringTextfieldWidget                       
  text_textarea                                Drupal\text\Plugin\Field\FieldWidget\TextareaWidget                                    
  text_textarea_with_summary                   Drupal\text\Plugin\Field\FieldWidget\TextareaWithSummaryWidget                         
  text_textfield                               Drupal\text\Plugin\Field\FieldWidget\TextfieldWidget                                   
  uri                                          Drupal\Core\Field\Plugin\Field\FieldWidget\UriWidget                                   
 -------------------------------------------- --------------------------------------------------------------------------------------- 

Would like to add that if you want to get list of baseFieldDefinitions available on your installation run

drupal debug:plugin field.field_type

and to get huge list of formatters, run this

drupal debug:plugin field.formatter

Tags:

Entities

8