Commit 0febf238 authored by catch's avatar catch

Issue #3108021 by alexpott, lauriii: Set $defaultTheme for install profiles...

Issue #3108021 by alexpott, lauriii: Set $defaultTheme for install profiles using configuration install

(cherry picked from commit de6caed1)
parent ec69f771
......@@ -416,6 +416,13 @@ protected function installDefaultThemeFromClassProperty(ContainerInterface $cont
// Use the install profile to determine the default theme if configured and
// not already specified.
$profile = $container->getParameter('install_profile');
$default_sync_path = drupal_get_path('profile', $profile) . '/config/sync';
$profile_config_storage = new FileStorage($default_sync_path, StorageInterface::DEFAULT_COLLECTION);
if (!isset($this->defaultTheme) && $profile_config_storage->exists('system.theme')) {
$this->defaultTheme = $profile_config_storage->read('system.theme')['default'];
}
$default_install_path = drupal_get_path('profile', $profile) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
$profile_config_storage = new FileStorage($default_install_path, StorageInterface::DEFAULT_COLLECTION);
if (!isset($this->defaultTheme) && $profile_config_storage->exists('system.theme')) {
......
......@@ -9,11 +9,6 @@
*/
class InstallerExistingConfigMultilingualTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
......@@ -9,11 +9,6 @@
*/
class InstallerExistingConfigNoSystemSiteTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
......@@ -11,11 +11,6 @@ class InstallerExistingConfigProfileHookInstall extends InstallerExistingConfigT
protected $profile = 'config_profile_with_hook_install';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
......@@ -9,11 +9,6 @@
*/
class InstallerExistingConfigTest extends InstallerExistingConfigTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment