Skip to content

Commit

Permalink
Merge 57c6673 into 7f94500
Browse files Browse the repository at this point in the history
  • Loading branch information
RiKap committed Mar 12, 2018
2 parents 7f94500 + 57c6673 commit 2de7970
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Bridges/Nette/WebLoaderExtension.php
Expand Up @@ -89,18 +89,20 @@ private function setupTracyPanel()

private function setupWebLoader()
{
$arguments = [$this->config['outputDir']];

if ($this->config['documentRoot']) {
$arguments[] = $this->config['documentRoot'];
}

$webLoader = $this->builder->addDefinition($this->prefix(self::ENGINE_PREFIX))
->setFactory(self::ENGINE_CLASSNAME)
->setArguments([$this->config['outputDir']]);
->setArguments($arguments);

if ($this->config['disableCache']) {
$webLoader->addSetup('disableCache');
}

if ($this->config['documentRoot']) {
$webLoader->addSetup('setDocumentRoot', [$this->config['documentRoot']]);
}

if ($this->config['filesCollections']) {
$webLoader->addSetup('createFilesCollectionsFromArray', [$this->config['filesCollections']]);
}
Expand Down

0 comments on commit 2de7970

Please sign in to comment.