function EntityDeleteFormTrait::logDeletionMessage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php \Drupal\Core\Entity\EntityDeleteFormTrait::logDeletionMessage()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php \Drupal\Core\Entity\EntityDeleteFormTrait::logDeletionMessage()
  3. 11.x core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php \Drupal\Core\Entity\EntityDeleteFormTrait::logDeletionMessage()

Logs a message about the deleted entity.

2 calls to EntityDeleteFormTrait::logDeletionMessage()
ContentEntityDeleteForm::logDeletionMessage in core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php
EntityDeleteFormTrait::submitForm in core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php
2 methods override EntityDeleteFormTrait::logDeletionMessage()
LanguageDeleteForm::logDeletionMessage in core/modules/language/src/Form/LanguageDeleteForm.php
Logs a message about the deleted entity.
MenuDeleteForm::logDeletionMessage in core/modules/menu_ui/src/Form/MenuDeleteForm.php
Logs a message about the deleted entity.

File

core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php, line 110

Class

EntityDeleteFormTrait
Provides a trait for an entity deletion form.

Namespace

Drupal\Core\Entity

Code

protected function logDeletionMessage() {
    $entity = $this->getEntity();
    $this->logger($entity->getEntityType()
        ->getProvider())
        ->info('The @entity-type %label has been deleted.', [
        '@entity-type' => $entity->getEntityType()
            ->getSingularLabel(),
        '%label' => $entity->label(),
    ]);
}

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