You are here

protected function EntityFormDisplayEditForm::getDefaultPlugin in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php \Drupal\field_ui\Form\EntityFormDisplayEditForm::getDefaultPlugin()
  2. 10 core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php \Drupal\field_ui\Form\EntityFormDisplayEditForm::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/EntityFormDisplayEditForm.php, line 64

Class

EntityFormDisplayEditForm
Edit form for the EntityFormDisplay entity type.

Namespace

Drupal\field_ui\Form

Code

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