Updated to Drupal 8.5. Core Media not yet in use.
[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  * @internal
11  */
12 class LanguageDeleteForm extends EntityDeleteForm {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function getDescription() {
18     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.');
19   }
20
21   /**
22    * {@inheritdoc}
23    */
24   public function getFormId() {
25     return 'language_delete_form';
26   }
27
28   /**
29    * {@inheritdoc}
30    */
31   protected function getDeletionMessage() {
32     return $this->t('The %language (%langcode) language has been removed.', ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()]);
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public function logDeletionMessage() {
39     $this->logger('language')->notice('The %language (%langcode) language has been removed.', ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()]);
40   }
41
42 }