Skip to content

Commit 5b548b1

Browse files
author
Jonathan Visser
committed
Add option to individually set magento themes in Magento ApplicationTemplate
1 parent b977b53 commit 5b548b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/ApplicationTemplate/Magento2.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,19 @@ private function initializeDefaultConfiguration(array $locales): void
5353
$this->addDeployExclude('dev/');
5454
$this->addDeployExclude('deploy/');
5555
}
56+
57+
/**
58+
* Set Magento themes and optionally allow split static deployment
59+
*
60+
* @param string[]|array<string, string[]> $themes Array of themes as ['vendor/theme', 'vendor/theme']
61+
* or as ['vendor/theme' => ['nl_NL', 'en_US'], 'vendor/theme' => ['nl_NL', 'en_US']]
62+
* @param bool $allowSplitStaticDeployment
63+
*/
64+
public function setMagentoThemes(array $themes, bool $allowSplitStaticDeployment = true): void
65+
{
66+
$this->setVariable('magento_themes', $themes);
67+
if (!array_is_list($themes) && $allowSplitStaticDeployment) {
68+
$this->setVariable('split_static_deployment', true);
69+
}
70+
}
5671
}

0 commit comments

Comments
 (0)