You are here

public function User::label in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User::label()

Gets the label of the entity.

Return value

string|null The label of the entity, or NULL if there is no label defined.

Overrides ContentEntityBase::label

File

core/modules/user/src/Entity/User.php, line 88

Class

User
Defines the user entity class.

Namespace

Drupal\user\Entity

Code

public function label() {
  return $this
    ->getDisplayName();
}