class BlockContentTranslationHandler

Same name and namespace in other branches
  1. 11.x core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler
  2. 10 core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler
  3. 8.9.x core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler

Defines the translation handler for custom blocks.

Hierarchy

Expanded class hierarchy of BlockContentTranslationHandler

File

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

Namespace

Drupal\block_content
View source
class BlockContentTranslationHandler extends ContentTranslationHandler {
  
  /**
   * {@inheritdoc}
   */
  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.