LanguageDeleteForm.php

Same filename and directory in other branches
  1. 9 core/modules/language/src/Form/LanguageDeleteForm.php
  2. 8.9.x core/modules/language/src/Form/LanguageDeleteForm.php
  3. 10 core/modules/language/src/Form/LanguageDeleteForm.php

Namespace

Drupal\language\Form

File

core/modules/language/src/Form/LanguageDeleteForm.php

View source
<?php

namespace Drupal\language\Form;

use Drupal\Core\Entity\EntityDeleteForm;

/**
 * Defines a confirmation form for deleting a language entity.
 *
 * @internal
 */
class LanguageDeleteForm extends EntityDeleteForm {
  
  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this->t('Deleting a language will remove all interface translations associated with it, and content in this language will be set to be language neutral. This action cannot be undone.');
  }
  
  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'language_delete_form';
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getDeletionMessage() {
    return $this->t('The %language (%langcode) language has been removed.', [
      '%language' => $this->entity
        ->label(),
      '%langcode' => $this->entity
        ->id(),
    ]);
  }
  
  /**
   * {@inheritdoc}
   */
  public function logDeletionMessage() {
    $this->logger('language')
      ->notice('The %language (%langcode) language has been removed.', [
      '%language' => $this->entity
        ->label(),
      '%langcode' => $this->entity
        ->id(),
    ]);
  }

}

Classes

Title Deprecated Summary
LanguageDeleteForm Defines a confirmation form for deleting a language entity.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.