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. 10 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().

2 string references to 'config_translation_test_config_translation_info_alter'
ConfigTranslationTestHooks::configTranslationInfoAlter in core/modules/config_translation/tests/modules/config_translation_test/src/Hook/ConfigTranslationTestHooks.php
Implements hook_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 35

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.