You are here

private function EntityDisplayBase::fieldHasDisplayOptions in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::fieldHasDisplayOptions()

Determines if a field has options for a given display.

Parameters

FieldDefinitionInterface $definition: A field definition.

Return value

array|null

File

core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 411
Contains \Drupal\Core\Entity\EntityDisplayBase.

Class

EntityDisplayBase
Provides a common base class for entity view and form displays.

Namespace

Drupal\Core\Entity

Code

private function fieldHasDisplayOptions(FieldDefinitionInterface $definition) {

  // The display only cares about fields that specify display options.
  // Discard base fields that are not rendered through formatters / widgets.
  return $definition
    ->getDisplayOptions($this->displayContext);
}