* move sideMenuItem group, icon_bas64, icon_base64_minimized to attributes property & support them october >1.0.467

* EventEmmiter with AssetMaker for correctly add assets from Plugin
This commit is contained in:
2020-07-17 12:10:38 +03:00
parent 7e75bb2b59
commit 047fc8c93a
3 changed files with 22 additions and 19 deletions

View File

@ -5,18 +5,11 @@
? $_COOKIE['sidenav_treegroupStatus']
: null
);
$categories = [];
foreach ($sideMenuItems as $sideItemCode => $item) {
if(!property_exists($item, 'group')) {
$item->group = 'default';
}
if(!property_exists($item, 'keywords')) {
$item->keywords = '';
}
if(!property_exists($item, 'description')) {
$item->description = '';
}
$categories[$item->group][$sideItemCode] = $item;
$categories[$item->attributes['group']][$sideItemCode] = $item;
}
?>
<ul class="top-level">
@ -37,16 +30,16 @@
))
? 'active'
: null;
?>" data-keywords="<?= e(trans($item->keywords)) ?>">
?>" data-keywords="<?= e(trans($item->attributes['keywords'])) ?>">
<a href="<?= $item->url ?>">
<?php if ($item->icon_base64):?>
<img src="<?=$item->icon_base64?>" alt="<?= e(trans($item->label)) ?>" title="<?= e(trans($item->label)) ?>">
<img src="<?=$item->icon_base64_minimized ? : $item->icon_base64?>" class="minimized" alt="<?= e(trans($item->label)) ?>" title="<?= e(trans($item->label)) ?>">
<?php else: ?>
<?php if ($item->attributes['icon_base64']):?>
<img src="<?=$item->attributes['icon_base64']?>" alt="<?= e(trans($item->label)) ?>" title="<?= e(trans($item->label)) ?>">
<img src="<?=$item->attributes['icon_base64_minimized'] ? : $item->attributes['icon_base64']?>" class="minimized" alt="<?= e(trans($item->label)) ?>" title="<?= e(trans($item->label)) ?>">
<?php elseif (isset($item->icon)): ?>
<i class="<?= $item->icon ?>"></i>
<?php endif;?>
<span class="header"><?= e(trans($item->label)) ?></span>
<span class="description"><?= e(trans($item->description)) ?></span>
<span class="description"><?= e(trans($item->attributes['description'])) ?></span>
</a>
</li>
<?php endforeach ?>