function test_theme_settings_form_system_theme_settings_submit in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/themes/test_theme_settings/theme-settings.php \test_theme_settings_form_system_theme_settings_submit()
- 9 core/modules/system/tests/themes/test_theme_settings/theme-settings.php \test_theme_settings_form_system_theme_settings_submit()
Test theme form settings submission handler.
1 string reference to 'test_theme_settings_form_system_theme_settings_submit'
- test_theme_settings_form_system_theme_settings_alter in core/
modules/ system/ tests/ themes/ test_theme_settings/ theme-settings.php - Implements hook_form_system_theme_settings_alter().
File
- core/
modules/ system/ tests/ themes/ test_theme_settings/ theme-settings.php, line 44 - Test to ensure theme compatibility with managed files.
Code
function test_theme_settings_form_system_theme_settings_submit(&$form, FormStateInterface $form_state) {
if ($file_id = $form_state
->getValue([
'custom_logo',
'0',
])) {
$file = File::load($file_id);
$file
->setPermanent();
$file
->save();
}
}