You are here

protected function CommentTranslationHandler::entityFormTitle in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/comment/src/CommentTranslationHandler.php \Drupal\comment\CommentTranslationHandler::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.

Overrides ContentTranslationHandler::entityFormTitle

File

core/modules/comment/src/CommentTranslationHandler.php, line 32

Class

CommentTranslationHandler
Defines the translation handler for comments.

Namespace

Drupal\comment

Code

protected function entityFormTitle(EntityInterface $entity) {
  return t('Edit comment @subject', [
    '@subject' => $entity
      ->label(),
  ]);
}