function ShortcutHooks::themesInstalled

Implements hook_themes_installed().

File

core/modules/shortcut/src/Hook/ShortcutHooks.php, line 117

Class

ShortcutHooks
Hook implementations for shortcut.

Namespace

Drupal\shortcut\Hook

Code

public function themesInstalled($theme_list) {
    // Theme settings are not configuration entities and cannot depend on modules
    // so to set a module-specific setting, we need to set it with logic.
    if (in_array('claro', $theme_list, TRUE)) {
        \Drupal::configFactory()->getEditable("claro.settings")
            ->set('third_party_settings.shortcut.module_link', TRUE)
            ->save(TRUE);
    }
}

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