Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContentEntityBase.php

function ContentEntityBase::label

Overrides EntityBase::label

1 call to ContentEntityBase::label()
Term::getName in core/modules/taxonomy/src/Entity/Term.php
Gets the term name.
3 methods override ContentEntityBase::label()
Media::label in core/modules/media/src/Entity/Media.php
Gets the label of the entity.
PathAlias::label in core/modules/path_alias/src/Entity/PathAlias.php
Gets the label of the entity.
User::label in core/modules/user/src/Entity/User.php
Gets the label of the entity.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 1296

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function label() {
    if ($this->getEntityType()
        ->getKey('label')) {
        return $this->getEntityKey('label');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal