mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-01-18 03:28:39 +00:00
40 lines
1.2 KiB
PHP
Executable File
40 lines
1.2 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 8.0
|
|
*
|
|
* @package Modules\Navigation
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link https://orange-management.org
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* @var \Modules\Navigation\Views\NavigationView $this
|
|
*/
|
|
|
|
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT])
|
|
&& \phpOMS\Utils\ArrayUtils::inArrayRecursive($this->parent, $this->nav[\Modules\Navigation\Models\NavigationType::CONTENT], 'nav_parent')
|
|
) {
|
|
echo '<div class="row"><div class="col-xs-12"><ul class="nav-top" role="navigation">';
|
|
|
|
$uriPath = $this->request->uri->getPath();
|
|
|
|
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT] as $key => $parent) {
|
|
foreach ($parent as $link) {
|
|
if ($link['nav_parent'] === $this->parent) {
|
|
$uri = \phpOMS\Uri\UriFactory::build($link['nav_uri']);
|
|
echo '<li'
|
|
. (\stripos($uri, $uriPath) !== false ? ' class="active"' : '')
|
|
. '><a tabindex="0" href="' . $uri . '">'
|
|
. $this->getHtml($link['nav_name'], 'Navigation') . '</a>';
|
|
}
|
|
}
|
|
}
|
|
|
|
echo '</ul></div></div>';
|
|
}
|