Skip to content

Commit

Permalink
added NavbarMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed May 10, 2017
1 parent f279ab0 commit 033c02d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/web.php
Expand Up @@ -43,6 +43,11 @@
],
]),
'container' => [
'singletons' => [
\hiqdev\thememanager\menus\AbstractNavbarMenu::class => [
'class' => \hiqdev\thememanager\menus\NavbarMenu::class,
],
],
'definitions' => [
\hiqdev\thememanager\widgets\PoweredBy::class => array_filter([
'url' => $params['poweredBy.url'],
Expand Down
32 changes: 32 additions & 0 deletions src/menus/NavbarMenu.php
@@ -0,0 +1,32 @@
<?php
/**
* Yii2 Original Theme for Yii2 projects.
*
* @link https://github.com/hiqdev/yii2-theme-original
* @package yii2-theme-original
* @license BSD-3-Clause
* @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
*/

namespace hiqdev\thememanager\menus;

use yii\bootstrap\Nav;

/**
* Navbar Menu.
* @author Andrii Vasyliev <sol@hiqdev.com>
*/
class NavbarMenu extends \hiqdev\yii2\menus\Menu
{
public function items()
{
return [
'nav' => [
'label' => AbstractMainMenu::widget([], [
'class' => Nav::class,
'options' => ['class' => 'nav navbar-nav navbar-right'],
]),
],
];
}
}

0 comments on commit 033c02d

Please sign in to comment.