Skip to content
Snippets Groups Projects

skip filtering & sorting if there's only one result

1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -540,6 +540,11 @@ class LayoutOptions extends LayoutDefault implements PluginFormInterface, Contai
* The sorted results.
*/
protected function filterAndSortResultsByThemeHierarchy(array $results): array {
// If there's only one result, we can and should skip this step.
if (count($results) == 1) {
return $results;
}
$default_theme_name = $this->themeHandler->getDefault();
$themes = $this->themeHandler->listInfo();
// Create a list which includes the current theme and all its base themes.
Loading