Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/block_content/src/BlockContentTranslationHandler.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\block_content; | |
4 | |
5 use Drupal\block_content\Entity\BlockContentType; | |
6 use Drupal\Core\Entity\EntityInterface; | |
7 use Drupal\content_translation\ContentTranslationHandler; | |
8 | |
9 /** | |
10 * Defines the translation handler for custom blocks. | |
11 */ | |
12 class BlockContentTranslationHandler extends ContentTranslationHandler { | |
13 | |
14 /** | |
15 * {@inheritdoc} | |
16 */ | |
17 protected function entityFormTitle(EntityInterface $entity) { | |
18 $block_type = BlockContentType::load($entity->bundle()); | |
19 return t('<em>Edit @type</em> @title', ['@type' => $block_type->label(), '@title' => $entity->label()]); | |
20 } | |
21 | |
22 } |