mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-02-07 20:38:43 +00:00
Added splash navigation
This commit is contained in:
parent
d8062a8618
commit
50af0b1b02
|
|
@ -114,4 +114,26 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
return $navView;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $pageId Page/parent Id for navigation
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function createNavigationSplash(int $pageId, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
$nav = Navigation::getInstance($request, $this->app->dbPool);
|
||||
$navView = new NavigationView($this->app, $request, $response);
|
||||
$navView->setTemplate('/Modules/Navigation/Theme/Backend/splash');
|
||||
$navView->setNav($nav->getNav());
|
||||
$navView->setLanguage($request->getL11n()->getLanguage());
|
||||
$navView->setParent($pageId);
|
||||
|
||||
return $navView;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
31
Theme/Backend/splash.tpl.php
Normal file
31
Theme/Backend/splash.tpl.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \Modules\Navigation\Views\NavigationView $this
|
||||
*/
|
||||
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT])) :
|
||||
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT] as $key => $parent) :
|
||||
foreach ($parent as $link) :
|
||||
if ($link['nav_parent'] == $this->parent) : ?>
|
||||
<section class="box w-33 floatLeft">
|
||||
<div class="inner centerText">
|
||||
<a href="<?= \phpOMS\Uri\UriFactory::build($link['nav_uri']); ?>">
|
||||
<p><i class="fa-5x <?= $link['nav_icon']; ?>"></i></p>
|
||||
<p><?= $this->l11n->getText('Navigation', $link['nav_name']) ?></p>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; endforeach; endforeach; endif;
|
||||
Loading…
Reference in New Issue
Block a user