NodeTranslationHandler::entityFormTitle

protected NodeTranslationHandler::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/node/src/NodeTranslationHandler.php, line 64

Class

NodeTranslationHandler
Defines the translation handler for nodes.

Namespace

Drupal\node

Code

protected function entityFormTitle(EntityInterface $entity) {
  $type_name = node_get_type_label($entity);
  return t('<em>Edit @type</em> @title', array('@type' => $type_name, '@title' => $entity->label()));
}
doc_Drupal
2016-10-29 09:31:24
Comments
Leave a Comment

Please login to continue.