function config_translation_test_config_translation_info_alter

Same name in other branches
  1. 9 core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module \config_translation_test_config_translation_info_alter()
  2. 8.9.x core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module \config_translation_test_config_translation_info_alter()
  3. 11.x core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module \config_translation_test_config_translation_info_alter()

Implements hook_config_translation_info_alter().

1 string reference to 'config_translation_test_config_translation_info_alter'
ConfigTranslationUiTest::testAlterInfo in core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php
Tests the config_translation_info_alter() hook.

File

core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module, line 33

Code

function config_translation_test_config_translation_info_alter(&$info) {
    if (\Drupal::state()->get('config_translation_test_config_translation_info_alter')) {
        // Limit account settings config files to only one of them.
        $info['entity.user.admin_form']['names'] = [
            'user.settings',
        ];
        // Add one more config file to the site information page.
        $info['system.site_information_settings']['names'][] = 'system.rss';
    }
}

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