You are here

protected function EckEntityDeleteForm::logDeletionMessage in Entity Construction Kit (ECK) 8

Overrides ContentEntityDeleteForm::logDeletionMessage

File

src/Form/Entity/EckEntityDeleteForm.php, line 25

Class

EckEntityDeleteForm
Provides a form for deleting an ECK entity.

Namespace

Drupal\eck\Form\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()
        ->getLabel(),
      '%label' => $entity
        ->getUntranslated()
        ->label(),
      '@language' => $entity
        ->language()
        ->getName(),
    ]);
  }
  else {
    $this
      ->traitLogDeletionMessage();
  }
}