You are here

protected function EntityViewDisplayEditForm::getDefaultPlugin in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php \Drupal\field_ui\Form\EntityViewDisplayEditForm::getDefaultPlugin()

Returns the ID of the default widget or formatter plugin for a field type.

Parameters

string $field_type: The field type.

Return value

string The widget or formatter plugin ID.

Overrides EntityDisplayFormBase::getDefaultPlugin

File

core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php, line 97

Class

EntityViewDisplayEditForm
Edit form for the EntityViewDisplay entity type.

Namespace

Drupal\field_ui\Form

Code

protected function getDefaultPlugin($field_type) {
  return isset($this->fieldTypes[$field_type]['default_formatter']) ? $this->fieldTypes[$field_type]['default_formatter'] : NULL;
}