public function ManagerForm::updateFieldFormDisplay in Hashtags 8
1 call to ManagerForm::updateFieldFormDisplay()
- ManagerForm::addField in src/
Form/ ManagerForm.php
File
- src/
Form/ ManagerForm.php, line 200
Class
Namespace
Drupal\hashtags\FormCode
public function updateFieldFormDisplay($entity_type, $bundle, $field_name) {
$form_display = entity_get_form_display($entity_type, $bundle, 'default');
$form_display
->setComponent($field_name, [
'type' => 'entity_reference_autocomplete_tags',
'weight' => 10,
]);
$form_display
->save();
}