- Fixed assets whenever it's not installed

This commit is contained in:
mcndave committed 2023-10-18 18:03:46 +00:00
1 parent bc6880c166
commit d8045b5f3c
3 files changed
+16 -19

No files matched your search

+13
View File
@@ -102,6 +102,8 @@ class Lean
{
$list = array_merge(...array_map(fn($app) => $app->views ?? [], $this->applications));
$this->verifyPathList($list);
uasort($list, fn($i1, $i2) => $i1['order'] <=> $i2['order'] );
return $list;
@@ -111,11 +113,22 @@ class Lean
{
$list = array_merge(...array_map(fn($app) => $app->piceaAssets ?? [], $this->applications));
$this->verifyPathList($list);
uasort($list, fn($i1, $i2) => $i1['order'] <=> $i2['order'] );
return $list;
}
protected function verifyPathList(array $list) : void
{
foreach($list as $item) {
if (! isset($item['order']) ) {
throw new \RuntimeException(sprintf("An error occured while verifying a path list (%s)", json_encode($item, \JSON_PRETTY_PRINT)));
}
}
}
public function getI18n(string $reader) : ? array
{
switch($reader) {
+2 -2
View File
@@ -22,7 +22,7 @@ class PiceaDefaultRegistration extends DefaultRegistrations {
{
parent::registerAll($compiler);
$this->ui->registerFormExtension($compiler);
$this->asset->registerExtension($compiler);
$this->ui AND $this->ui->registerFormExtension($compiler);
$this->asset AND $this->asset->registerExtension($compiler);
}
}