EntityDisplayFormBase::getFieldDefinitions

protected EntityDisplayFormBase::getFieldDefinitions()

Collects the definitions of fields whose display is configurable.

Return value

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

File

core/modules/field_ui/src/Form/EntityDisplayFormBase.php, line 126

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);
  });
}
doc_Drupal
2016-10-29 09:05:24
Comments
Leave a Comment

Please login to continue.