protected function EntityDisplayFormBase::getExtraFields in Drupal 8
Same name and namespace in other branches
- 9 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 766
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 isset($extra_fields[$context]) ? $extra_fields[$context] : [];
}