You are here

protected function EntityFormField::getPluginDefaultOption in Views Entity Form Field 8

Returns the default field widget ID for a specific field type.

Parameters

string $field_type: The field type ID.

Return value

null|string The default field widget ID. Null otherwise.

File

src/Plugin/views/field/EntityFormField.php, line 209

Class

EntityFormField
Defines a views form element for an entity field widget.

Namespace

Drupal\views_entity_form_field\Plugin\views\field

Code

protected function getPluginDefaultOption($field_type) {
  $definition = $this
    ->getFieldTypeManager()
    ->getDefinition($field_type, FALSE);
  return $definition && isset($definition['default_widget']) ? $definition['default_widget'] : NULL;
}