Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

ContentTranslationDeleteForm.php

Namespace

Drupal\content_translation\Form

File

core/modules/content_translation/src/Form/ContentTranslationDeleteForm.php

View source
<?php

namespace Drupal\content_translation\Form;

use Drupal\Core\Entity\ContentEntityDeleteForm;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageInterface;

/**
 * Delete translation form for content_translation module.
 *
 * @internal
 */
class ContentTranslationDeleteForm extends ContentEntityDeleteForm {
    
    /**
     * {@inheritdoc}
     */
    public function getFormId() {
        return 'content_translation_delete_confirm';
    }
    
    /**
     * {@inheritdoc}
     */
    public function buildForm(array $form, FormStateInterface $form_state, ?LanguageInterface $language = NULL) {
        if ($language) {
            $form_state->set('langcode', $language->getId());
        }
        return parent::buildForm($form, $form_state);
    }

}

Classes

Title Deprecated Summary
ContentTranslationDeleteForm Delete translation form for content_translation module.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal