ContentEntityDeleteForm::getDeletionMessage

protected ContentEntityDeleteForm::getDeletionMessage()

File

core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php, line 90

Class

ContentEntityDeleteForm
Provides a generic base class for a content entity deletion form.

Namespace

Drupal\Core\Entity

Code

protected function getDeletionMessage() {
  /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
  $entity = $this->getEntity();

  if (!$entity->isDefaultTranslation()) {
    return $this->t('The @entity-type %label @language translation has been deleted.', [
      '@entity-type' => $entity->getEntityType()->getLowercaseLabel(),
      '%label' => $entity->label(),
      '@language' => $entity->language()->getName(),
    ]);
  }

  return $this->traitGetDeletionMessage();
}
doc_Drupal
2016-10-29 08:57:11
Comments
Leave a Comment

Please login to continue.