Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Multi-theme Sites #310

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,9 @@ public function getPatterns() {
* @return array
* An array containing directory paths keyed by their extension name.
*/
protected function getDirectories() {
$default_theme = $this->themeHandler->getDefault();
$base_themes = $this->themeHandler->getBaseThemes($this->themeHandler->listInfo(), $default_theme);
$theme_directories = $this->themeHandler->getThemeDirectories();

$directories = [];
if (isset($theme_directories[$default_theme])) {
$directories[$default_theme] = $theme_directories[$default_theme];
foreach ($base_themes as $name => $theme) {
$directories[$name] = $theme_directories[$name];
}
}

return $directories + $this->moduleHandler->getModuleDirectories();
}
protected function getDirectories() {
return $this->themeHandler->getThemeDirectories() + $this->moduleHandler->getModuleDirectories();
}

/**
* Get extension name that hosts the given YAML definition file.
Expand Down