You are here

class BlockContentTranslationHandler in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler
  2. 9 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(),
    ]);
  }

}

Members