function ConfigTranslationDeleteForm::buildForm

Same name in other branches
  1. 9 core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php \Drupal\config_translation\Form\ConfigTranslationDeleteForm::buildForm()
  2. 8.9.x core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php \Drupal\config_translation\Form\ConfigTranslationDeleteForm::buildForm()
  3. 11.x core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php \Drupal\config_translation\Form\ConfigTranslationDeleteForm::buildForm()

Overrides ConfirmFormBase::buildForm

File

core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php, line 116

Class

ConfigTranslationDeleteForm
Builds a form to delete configuration translation.

Namespace

Drupal\config_translation\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, ?RouteMatchInterface $route_match = NULL, $plugin_id = NULL, $langcode = NULL) {
    
    /** @var \Drupal\config_translation\ConfigMapperInterface $mapper */
    $mapper = $this->configMapperManager
        ->createInstance($plugin_id);
    $mapper->populateFromRouteMatch($route_match);
    $language = $this->languageManager
        ->getLanguage($langcode);
    if (!$language) {
        throw new NotFoundHttpException();
    }
    $this->mapper = $mapper;
    $this->language = $language;
    return parent::buildForm($form, $form_state);
}

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