BlockContentTranslationHandler::entityFormTitle

protected BlockContentTranslationHandler::entityFormTitle(EntityInterface $entity)

Returns the title to be used for the entity form page.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity whose form is being altered.

Return value

string|null The label of the entity, or NULL if there is no label defined.

Overrides ContentTranslationHandler::entityFormTitle

File

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

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 t('<em>Edit @type</em> @title', array('@type' => $block_type->label(), '@title' => $entity->label()));
}
doc_Drupal
2016-10-29 08:47:04
Comments
Leave a Comment

Please login to continue.