public function EntityTest::label

Overrides Drupal\entity\Entity::label().

Overrides Entity::label

File

drupal/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTest.php, line 94
Definition of Drupal\entity_test\Plugin\Core\Entity\EntityTest.

Class

EntityTest
Defines the test entity class.

Namespace

Drupal\entity_test\Plugin\Core\Entity

Code

public function label($langcode = LANGUAGE_DEFAULT) {
  return $this
    ->getTranslation($langcode)->name->value;
}