system_region_list() could use getTheme() instead of listInfo()

Created on 10 January 2016, over 8 years ago
Updated 1 February 2023, over 1 year ago
  if (!$theme instanceof Extension) {
    $themes = \Drupal::service('theme_handler')->listInfo();
    if (!isset($themes[$theme])) {
      return array();
    }
    $theme = $themes[$theme];
  }

system_region_list() is retrieving info on all installed themes, when it just wants the extension object for the current theme. I'm not sure if there's a performance cost, but even if there isn't, it's clearer if the code just gets the one theme it wants.

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
SystemΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024