BrightcoveEntityDeleteForm.php in Brightcove Video Connect 8.2        
                          
                  
                        
  
  
  
  
File
  src/Form/BrightcoveEntityDeleteForm.php
  
    View source  
  <?php
namespace Drupal\brightcove\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
class BrightcoveEntityDeleteForm extends ContentEntityDeleteForm {
  
  protected function getDeletionMessage() {
    
    $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(),
    ]);
  }
  
  public function getQuestion() {
    
    $entity = $this
      ->getEntity();
    if (!$entity
      ->isDefaultTranslation()) {
      return $this
        ->t('Are you sure you want to delete the @language translation of the @entity-type %label?', [
        '@language' => $entity
          ->language()
          ->getName(),
        '@entity-type' => $this
          ->getEntity()
          ->getEntityType()
          ->getLabel(),
        '%label' => $this
          ->getEntity()
          ->label(),
      ]);
    }
    return $this
      ->t('Are you sure you want to delete the @entity-type %label?', [
      '@entity-type' => $this
        ->getEntity()
        ->getEntityType()
        ->getLabel(),
      '%label' => $this
        ->getEntity()
        ->label(),
    ]);
  }
}