Skip to content

Commit

Permalink
Allow passing custom skin files to compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Aug 23, 2023
1 parent d04727d commit 258dabd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Compiler/FileCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ class FileCompiler
*/
protected string $rootDir;

/**
* Custom skin files
*/
public array $customSkinFiles = [];

/**
* FileCompiler constructor.
*/
Expand Down Expand Up @@ -181,9 +186,9 @@ public function compileConfigFiles(): void
public function compileSkinFiles(): void
{
$arrContent = [];
$skinFiles = StringUtil::deserialize($this->objTheme->skinSourceFiles);
$skinFiles = array_merge($this->customSkinFiles, StringUtil::deserialize($this->objTheme->skinSourceFiles, true));

if (null !== $skinFiles)
if (!empty($skinFiles))
{
// reverse loading order so following skin files will override configurations from previous ones
$skinFiles = array_reverse($skinFiles);
Expand Down

0 comments on commit 258dabd

Please sign in to comment.