function BlockContentTranslationHandler::entityFormTitle

Same name in other branches
  1. 8.9.x core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler::entityFormTitle()
  2. 10 core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler::entityFormTitle()
  3. 11.x core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler::entityFormTitle()

Overrides ContentTranslationHandler::entityFormTitle

File

core/modules/block_content/src/BlockContentTranslationHandler.php, line 17

Class

BlockContentTranslationHandler
Defines the translation handler for custom blocks.

Namespace

Drupal\block_content

Code

protected function entityFormTitle(EntityInterface $entity) {
    $block_type = BlockContentType::load($entity->bundle());
    return $this->t('<em>Edit @type</em> @title', [
        '@type' => $block_type->label(),
        '@title' => $entity->label(),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.