Security update to Drupal 8.4.6
[yaffs-website] / web / core / modules / language / src / Form / LanguageDeleteForm.php
1 <?php
2
3 namespace Drupal\language\Form;
4
5 use Drupal\Core\Entity\EntityDeleteForm;
6
7 /**
8  * Defines a confirmation form for deleting a language entity.
9  */
10 class LanguageDeleteForm extends EntityDeleteForm {
11
12   /**
13    * {@inheritdoc}
14    */
15   public function getDescription() {
16     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.');
17   }
18
19   /**
20    * {@inheritdoc}
21    */
22   public function getFormId() {
23     return 'language_delete_form';
24   }
25
26   /**
27    * {@inheritdoc}
28    */
29   protected function getDeletionMessage() {
30     return $this->t('The %language (%langcode) language has been removed.', ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()]);
31   }
32
33   /**
34    * {@inheritdoc}
35    */
36   public function logDeletionMessage() {
37     $this->logger('language')->notice('The %language (%langcode) language has been removed.', ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()]);
38   }
39
40 }