protected function ContentEntityDeleteForm::logDeletionMessage

protected ContentEntityDeleteForm::logDeletionMessage()

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

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

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!ContentEntityDeleteForm.php/function/ContentEntityDeleteForm::logDeletionMessage/8.1.x