You are here

public function Media::label in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::label()
  2. 9 core/modules/media/src/Entity/Media.php \Drupal\media\Entity\Media::label()

Gets the label of the entity.

Return value

string|\Drupal\Core\StringTranslation\TranslatableMarkup|null The label of the entity, or NULL if there is no label defined.

Overrides ContentEntityBase::label

File

core/modules/media/src/Entity/Media.php, line 108

Class

Media
Defines the media entity class.

Namespace

Drupal\media\Entity

Code

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