You are here

protected function ContentTranslationHandler::entityFormTitle in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::entityFormTitle()
  2. 9 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::entityFormTitle()

Returns the title to be used for the entity form page.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity whose form is being altered.

Return value

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

File

core/modules/content_translation/src/ContentTranslationHandler.php, line 802

Class

ContentTranslationHandler
Base class for content translation handlers.

Namespace

Drupal\content_translation

Code

protected function entityFormTitle(EntityInterface $entity) {
  return $entity
    ->label();
}