Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By mikelutz on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.2.x
Introduced in version:
8.2.0
Description:
Because of the configuration system, there is no reason for ThemeHandler::setDefault() to exist. Instead of calling setDefault, use the config system to modify the system.theme config directly.
Before:
\Drupal::service('theme_handler)->setDefault('bartik');
After:
\Drupal::configFactory()->getEditable('system.theme')->set('default', 'bartik')->save();
Impacts:
Site builders, administrators, editors
Themers