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();
  }
}
doc_Drupal
2016-10-29 08:57:11
Comments
Leave a Comment

Please login to continue.