function config_translation_test_form_config_translation_edit_form_alter
Same name and namespace in other branches
- 9 core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module \config_translation_test_form_config_translation_edit_form_alter()
- 8.9.x core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module \config_translation_test_form_config_translation_edit_form_alter()
- 10 core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module \config_translation_test_form_config_translation_edit_form_alter()
Implements hook_form_FORM_ID_alter() for ConfigTranslationEditForm.
Adds a column to the configuration translation edit form that shows the current translation. Note that this column would not be displayed by default, as the columns are hardcoded in config_translation_manage_form_element.html.twig. The template would need to be overridden for the column to be displayed.
See also
\Drupal\config_translation\Form\ConfigTranslationEditForm
File
-
core/
modules/ config_translation/ tests/ modules/ config_translation_test/ config_translation_test.module, line 81
Code
function config_translation_test_form_config_translation_edit_form_alter(&$form, FormStateInterface $form_state) {
if (\Drupal::state()->get('config_translation_test_alter_form_alter')) {
$form['#altered'] = TRUE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.