23 lines
1.0 KiB
PHP
23 lines
1.0 KiB
PHP
<?php
|
|
use_helper('stBackend');
|
|
/**
|
|
* @var stNavigationMenuItem[] $items
|
|
*/
|
|
?>
|
|
<ul<?php if ($inverted): ?> class="inverted"<?php endif ?>>
|
|
<?php foreach ($items as $item): $children = $item->getItems() ?>
|
|
<li<?php if ($children): ?> class="expandable"<?php endif; ?>>
|
|
<?php if ($item->getUrl()): ?>
|
|
<a href="<?php echo st_url_for($item->getUrl()) ?>">
|
|
<?php if($item->getIcon()): ?><img src="<?php echo get_app_icon($item->getIcon()); ?>" alt="" /><?php endif; ?>
|
|
<span><?php echo __($item->getTitle(), null, $item->getI18n()) ?></span>
|
|
</a>
|
|
<?php else: ?>
|
|
<span><?php echo __($item->getTitle(), null, $item->getI18n()) ?></span>
|
|
<?php endif; ?>
|
|
<?php if ($children): ?>
|
|
<?php echo st_get_fast_partial('stBackend/menu', array('items' => $children, 'inverted' => !$inverted), true) ?>
|
|
<?php endif; ?>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|