You are here

protected function EntityDisplayFormBase::getExtraFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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\EntityManagerInterface::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 717
Contains \Drupal\field_ui\Form\EntityDisplayFormBase.

Class

EntityDisplayFormBase
Base class for EntityDisplay edit forms.

Namespace

Drupal\field_ui\Form

Code

protected function getExtraFields() {
  $context = $this->displayContext == 'view' ? 'display' : $this->displayContext;
  $extra_fields = $this->entityManager
    ->getExtraFields($this->entity
    ->getTargetEntityTypeId(), $this->entity
    ->getTargetBundle());
  return isset($extra_fields[$context]) ? $extra_fields[$context] : array();
}