|
|
@ -1,6 +1,7 @@ |
|
|
|
<?php namespace Wpstudio\Assetsmanifest\Components; |
|
|
|
|
|
|
|
use Cms\Classes\ComponentBase; |
|
|
|
use Cms\Classes\Theme; |
|
|
|
use Wpstudio\AssetsManifest\Classes\ManifestReader; |
|
|
|
|
|
|
|
class Manifest extends ComponentBase |
|
|
@ -26,6 +27,7 @@ class Manifest extends ComponentBase |
|
|
|
'validationPattern' => '^[^/].*/manifest.json', |
|
|
|
'validationMessage' => self::LANG_PREFIX . 'properties.path.validationMessage', |
|
|
|
'placeholder' => 'assets/build/manifest.json', |
|
|
|
'default' => 'assets/build/manifest.json', |
|
|
|
'showExternalParam' => false, |
|
|
|
'required' => true, |
|
|
|
] |
|
|
@ -49,7 +51,7 @@ class Manifest extends ComponentBase |
|
|
|
*/ |
|
|
|
private function prepareVars(): void |
|
|
|
{ |
|
|
|
$this->manifestReader = new ManifestReader(base_path($this->property('path'))); |
|
|
|
$this->manifestReader = new ManifestReader(Theme::getActiveTheme()->getPath() . '/' . $this->property('path')); |
|
|
|
} |
|
|
|
|
|
|
|
public function getManifestReader(): ManifestReader |
|
|
|