function ContentEntityDeleteForm::getDeletionMessage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php \Drupal\Core\Entity\ContentEntityDeleteForm::getDeletionMessage()
  2. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php \Drupal\Core\Entity\ContentEntityDeleteForm::getDeletionMessage()
  3. 10 core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php \Drupal\Core\Entity\ContentEntityDeleteForm::getDeletionMessage()
1 call to ContentEntityDeleteForm::getDeletionMessage()
ContentEntityDeleteForm::submitForm in core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form stateā€¦
4 methods override ContentEntityDeleteForm::getDeletionMessage()
DeleteForm::getDeletionMessage in core/modules/comment/src/Form/DeleteForm.php
MenuLinkContentDeleteForm::getDeletionMessage in core/modules/menu_link_content/src/Form/MenuLinkContentDeleteForm.php
NodeDeleteForm::getDeletionMessage in core/modules/node/src/Form/NodeDeleteForm.php
TermDeleteForm::getDeletionMessage in core/modules/taxonomy/src/Form/TermDeleteForm.php

File

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

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()
                ->getSingularLabel(),
            '%label' => $entity->label(),
            '@language' => $entity->language()
                ->getName(),
        ]);
    }
    return $this->traitGetDeletionMessage();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.