function EntityDisplayFormBase::getExtraFields
Same name in other branches
- 9 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getExtraFields()
- 8.9.x core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getExtraFields()
- 10 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getExtraFields()
Returns the extra fields of the entity type and bundle used by this form.
Return value
array An array of extra field info.
See also
\Drupal\Core\Entity\EntityFieldManagerInterface::getExtraFields()
1 call to EntityDisplayFormBase::getExtraFields()
- EntityDisplayFormBase::form in core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php - Gets the actual form array to be built.
File
-
core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php, line 750
Class
- EntityDisplayFormBase
- Base class for EntityDisplay edit forms.
Namespace
Drupal\field_ui\FormCode
protected function getExtraFields() {
$context = $this->displayContext == 'view' ? 'display' : $this->displayContext;
$extra_fields = $this->entityFieldManager
->getExtraFields($this->entity
->getTargetEntityTypeId(), $this->entity
->getTargetBundle());
return $extra_fields[$context] ?? [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.