You are here

protected function EntityDisplayFormBase::getFieldDefinitions 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::getFieldDefinitions()

Collects the definitions of fields whose display is configurable.

Return value

\Drupal\Core\Field\FieldDefinitionInterface[] The array of field definitions

1 call to EntityDisplayFormBase::getFieldDefinitions()
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 133
Contains \Drupal\field_ui\Form\EntityDisplayFormBase.

Class

EntityDisplayFormBase
Base class for EntityDisplay edit forms.

Namespace

Drupal\field_ui\Form

Code

protected function getFieldDefinitions() {
  $context = $this->displayContext;
  return array_filter($this->entityManager
    ->getFieldDefinitions($this->entity
    ->getTargetEntityTypeId(), $this->entity
    ->getTargetBundle()), function (FieldDefinitionInterface $field_definition) use ($context) {
    return $field_definition
      ->isDisplayConfigurable($context);
  });
}