9d225dc66b746c3edafabb0e6559db815f2de66a
[yaffs-website] / web / core / modules / content_translation / src / Form / ContentTranslationDeleteForm.php
1 <?php
2
3 namespace Drupal\content_translation\Form;
4
5 use Drupal\Core\Entity\ContentEntityDeleteForm;
6 use Drupal\Core\Form\FormStateInterface;
7 use Drupal\Core\Language\LanguageInterface;
8
9 /**
10  * Delete translation form for content_translation module.
11  */
12 class ContentTranslationDeleteForm extends ContentEntityDeleteForm {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function getFormId() {
18     return 'content_translation_delete_confirm';
19   }
20
21   /**
22    * {@inheritdoc}
23    */
24   public function buildForm(array $form, FormStateInterface $form_state, LanguageInterface $language = NULL) {
25     if ($language) {
26       $form_state->set('langcode', $language->getId());
27     }
28     return parent::buildForm($form, $form_state);
29   }
30
31 }