function EntityDisplayBase::fieldHasDisplayOptions
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::fieldHasDisplayOptions()
- 8.9.x core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::fieldHasDisplayOptions()
- 11.x core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::fieldHasDisplayOptions()
Determines if a field has options for a given display.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $definition: A field definition.
Return value
array|null
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityDisplayBase.php, line 436
Class
- EntityDisplayBase
- Provides a common base class for entity view and form displays.
Namespace
Drupal\Core\EntityCode
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.