You are here

protected function BrightcoveEntityDeleteForm::getDeletionMessage in Brightcove Video Connect 3.x

Same name and namespace in other branches
  1. 8.2 src/Form/BrightcoveEntityDeleteForm.php \Drupal\brightcove\Form\BrightcoveEntityDeleteForm::getDeletionMessage()
  2. 8 src/Form/BrightcoveEntityDeleteForm.php \Drupal\brightcove\Form\BrightcoveEntityDeleteForm::getDeletionMessage()

Overrides ContentEntityDeleteForm::getDeletionMessage

File

src/Form/BrightcoveEntityDeleteForm.php, line 15

Class

BrightcoveEntityDeleteForm
Builds form for Brightcove content entity delete.

Namespace

Drupal\brightcove\Form

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()
        ->getLabel(),
      '%label' => $entity
        ->label(),
      '@language' => $entity
        ->language()
        ->getName(),
    ]);
  }
  return $this
    ->t('The @entity-type %label has been deleted.', [
    '@entity-type' => $entity
      ->getEntityType()
      ->getLabel(),
    '%label' => $entity
      ->label(),
  ]);
}