diff --git a/src/ApplicationTemplate/Magento2.php b/src/ApplicationTemplate/Magento2.php index 6ce7d91..d7f5c03 100644 --- a/src/ApplicationTemplate/Magento2.php +++ b/src/ApplicationTemplate/Magento2.php @@ -53,4 +53,19 @@ private function initializeDefaultConfiguration(array $locales): void $this->addDeployExclude('dev/'); $this->addDeployExclude('deploy/'); } + + /** + * Set Magento themes and optionally allow split static deployment + * + * @param string[]|array $themes Array of themes as ['vendor/theme', 'vendor/theme'] + * or as ['vendor/theme' => ['nl_NL', 'en_US'], 'vendor/theme' => ['nl_NL', 'en_US']] + * @param bool $allowSplitStaticDeployment + */ + public function setMagentoThemes(array $themes, bool $allowSplitStaticDeployment = true): void + { + $this->setVariable('magento_themes', $themes); + if (!array_is_list($themes) && $allowSplitStaticDeployment) { + $this->setVariable('split_static_deployment', true); + } + } }