Skip to content

Commit

Permalink
ACMS-1202: Update admin theme from Acquia Claro to Acquia CMS Gin.
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshreeputra committed Oct 3, 2023
1 parent fa884f5 commit 78a492f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions modules/acquia_cms_common/acquia_cms_common.install
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ function acquia_cms_common_install($is_syncing) {
'view media',
]);

// Enable acquia_claro theme.
// Enable acquia_cms_gin theme.
$themesList = \Drupal::service('extension.list.theme')->getList();
$themesInstall = ["olivero"];
if (isset($themesList['acquia_claro'])) {
$themesInstall[] = "acquia_claro";
if (isset($themesList['acquia_cms_gin'])) {
$themesInstall[] = "acquia_cms_gin";
}
\Drupal::service('theme_installer')->install($themesInstall);
\Drupal::configFactory()->getEditable('system.theme')->set('default', 'olivero')->save();
if (in_array("acquia_claro", $themesInstall)) {
\Drupal::configFactory()->getEditable('system.theme')->set('admin', "acquia_claro")->save();
if (in_array("acquia_cms_gin", $themesInstall)) {
\Drupal::configFactory()->getEditable('system.theme')->set('admin', "acquia_cms_gin")->save();
}

// Re-write the content and media view on module install,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ public function deleteHeadlessUiPaths() {
*/
public function updateHeadlessUiConfig(bool $isEnabled = TRUE) {
if ($isEnabled) {
// Reset default theme to acquia_claro.
if ($this->themeHandler->themeExists('acquia_claro')) {
// Reset default theme to acquia_cms_gin.
if ($this->themeHandler->themeExists('acquia_cms_gin')) {
$this->configFactory
->getEditable('system.theme')
->set('default', 'acquia_claro')
->set('default', 'acquia_cms_gin')
->save();
}

Expand Down
8 changes: 4 additions & 4 deletions modules/acquia_cms_tour/src/Services/StarterKitService.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function getModulesAndThemes(string $starter_kit, string $demo_question =
'acquia_cms_tour',
];
$enableThemes = [
'admin' => 'acquia_claro',
'admin' => 'acquia_cms_gin',
'default' => 'cohesion_theme',
];
break;
Expand All @@ -167,7 +167,7 @@ public function getModulesAndThemes(string $starter_kit, string $demo_question =
'acquia_cms_tour',
];
$enableThemes = [
'admin' => 'acquia_claro',
'admin' => 'acquia_cms_gin',
'default' => 'olivero',
];
break;
Expand All @@ -180,14 +180,14 @@ public function getModulesAndThemes(string $starter_kit, string $demo_question =
'acquia_cms_tour',
];
$enableThemes = [
'admin' => 'acquia_claro',
'admin' => 'acquia_cms_gin',
'default' => 'olivero',
];
break;

default:
$enableThemes = [
'admin' => 'acquia_claro',
'admin' => 'acquia_cms_gin',
'default' => 'olivero',
];
$enableModules = [
Expand Down

0 comments on commit 78a492f

Please sign in to comment.