public function EntityTestNoLabel::label in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php \Drupal\entity_test\Entity\EntityTestNoLabel::label()
- 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php \Drupal\entity_test\Entity\EntityTestNoLabel::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/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestNoLabel.php, line 29
Class
- EntityTestNoLabel
- Test entity class.
Namespace
Drupal\entity_test\EntityCode
public function label() {
return $this
->getName();
}