function EntityFieldManagerInterface::getFieldLabels

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php \Drupal\Core\Entity\EntityFieldManagerInterface::getFieldLabels()

Returns the labels used for a field on an entity type.

Parameters

string $entity_type: The entity type.

string $field_name: The machine name of the field.

Return value

array An array where the first element is the most commonly used label for the field and the second element is a list of all labels in use. When more than one label is used the same number of times then the labels are sorted alphabetically.

File

core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php, line 157

Class

EntityFieldManagerInterface
Provides an interface for an entity field manager.

Namespace

Drupal\Core\Entity

Code

public function getFieldLabels(string $entity_type, string $field_name) : array;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.