Skip to content

Commit

Permalink
localized menu
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Sep 15, 2015
1 parent c91bd4a commit 2360aa3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ class Plugin extends \hiqdev\pluginmanager\Plugin
{
protected $_items = [
'menus' => [
[
'class' => 'hipanel\modules\dashboard\SidebarMenu',
],
'hipanel\modules\dashboard\SidebarMenu',
],
'modules' => [
'dashboard' => [
Expand Down
19 changes: 12 additions & 7 deletions src/SidebarMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace hipanel\modules\dashboard;

use Yii;

class SidebarMenu extends \hipanel\base\Menu
{
protected $_addTo = 'sidebar';
Expand All @@ -20,11 +22,14 @@ class SidebarMenu extends \hipanel\base\Menu
'before' => ['clients', 'finance', 'tickets', 'domains', 'servers', 'hosting'],
];

protected $_items = [
'dashboard' => [
'label' => 'Dashboard',
'url' => ['/dashboard/dashboard'],
'icon' => 'fa-dashboard',
],
];
public function items()
{
return [
'dashboard' => [
'label' => Yii::t('app', 'Dashboard'),
'url' => ['/dashboard/dashboard'],
'icon' => 'fa-dashboard',
],
];
}
}

0 comments on commit 2360aa3

Please sign in to comment.