Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

BlockContentTranslationHandler.php

Namespace

Drupal\block_content

File

core/modules/block_content/src/BlockContentTranslationHandler.php

View source
<?php

namespace Drupal\block_content;

use Drupal\block_content\Entity\BlockContentType;
use Drupal\Core\Entity\EntityInterface;
use Drupal\content_translation\ContentTranslationHandler;

/**
 * Defines the translation handler for content blocks.
 */
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(),
        ]);
    }

}

Classes

Title Deprecated Summary
BlockContentTranslationHandler Defines the translation handler for content blocks.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal