mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
7af890b44c
- Custom filters are now loaded in InfoCenter - filter_kurzbz is automatically generated - Now is saved the filter description - filter description is the same for every language - Added method getCustomFiltersList to system/Filters_model.php
78 lines
1.4 KiB
PHP
78 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
*
|
|
*/
|
|
class NavigationMenuWidget extends Widget
|
|
{
|
|
private $navigationMenu;
|
|
|
|
private static $NavigationMenuWidgetInstance;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public function display($widgetData)
|
|
{
|
|
$this->navigationMenu = $widgetData;
|
|
|
|
self::$NavigationMenuWidgetInstance = $this;
|
|
|
|
$this->view('widgets/navigationMenu');
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public static function printNavigationMenu()
|
|
{
|
|
foreach (self::$NavigationMenuWidgetInstance->navigationMenu as $item)
|
|
{
|
|
self::printNavItem($item);
|
|
}
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public static function printNavItem($item, $depth = 1)
|
|
{
|
|
$expanded = isset($item['expand']) && $item['expand'] === true ? ' active' : '';
|
|
|
|
echo '<li class="'.$expanded.'">';
|
|
|
|
echo '<a href="'.$item['link'].'"'.$expanded.'>';
|
|
|
|
if (isset($item['icon']))
|
|
{
|
|
echo '<i class="fa fa-'.$item['icon'].' fa-fw"></i> ';
|
|
}
|
|
|
|
// echo '<span>'.$item['description'].'</span>'.'<span style="">test</span>';
|
|
echo $item['description'];
|
|
|
|
if (!empty($item['children']))
|
|
{
|
|
echo '<span class="fa arrow"></span>';
|
|
}
|
|
|
|
echo '</a>';
|
|
|
|
if (!empty($item['children']))
|
|
{
|
|
$level = '';
|
|
if ($depth === 1)
|
|
$level = 'second';
|
|
elseif ($depth > 1)
|
|
$level = 'third';
|
|
|
|
echo '<ul class="nav nav-'.$level.'-level" '.$expanded.'>';
|
|
foreach ($item['children'] as $child)
|
|
self::printNavItem($child, ++$depth);
|
|
echo '</ul>';
|
|
}
|
|
|
|
echo '</li>';
|
|
}
|
|
}
|