function ConfigTranslationTestHooks::formConfigTranslationFormAlter

Implements hook_form_BASE_FORM_ID_alter() for ConfigTranslationFormBase.

Adds a list of configuration names to the top of the configuration translation form.

See also

\Drupal\config_translation\Form\ConfigTranslationFormBase

File

core/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php, line 58

Class

ConfigTranslationTestHooks
Hook implementations for config_translation_test.

Namespace

Drupal\config_translation_test\Hook

Code

public function formConfigTranslationFormAlter(&$form, FormStateInterface $form_state) : void {
    if (\Drupal::state()->get('config_translation_test_alter_form_alter')) {
        $form['#base_altered'] = TRUE;
    }
}

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