Exemplo n.º 1
0
 protected function getMenu(Request $request)
 {
     // Build your menu here by constructing a MenuItemModel array
     $menuItems = [];
     $groups = new MenuItemModel('groupsid', $this->translator->trans('Password Groups'), 'groups', array(), 'iconclasses fa fa-object-group');
     $menuItems[] = $groups;
     /** @var Groups $group */
     /** @var UserGroup $usergroup */
     if ($this->current_user) {
         $groups->addChild(new MenuItemModel('allgroups', 'All Groups', 'groups'));
         foreach ($this->current_user->getGroups() as $usergroup) {
             $group = $usergroup->getGroup();
             $groups->addChild(new MenuItemModel('group_' . $group->getId(), $group->getName(), 'logins', ['groupid' => $group->getId()], ''));
         }
         $groups->addChild(new MenuItemModel('new_group', $this->translator->trans('New Group'), 'new_group', [], 'fa fa-plus'));
     }
     $menuItems[] = new MenuItemModel('export_all', $this->translator->trans('Export All Passwords'), 'export_logins');
     /*
      *
             // Add some children
     
             // A child with an icon
             $groups->addChild(new MenuItemModel('ChildOneItemId', 'ChildOneDisplayName', 'child_1_route', array(), 'fa fa-rss-square'));
     
             // A child with default circle icon
             $groups->addChild(new MenuItemModel('ChildTwoItemId', 'ChildTwoDisplayName', 'child_2_route'));*/
     return $this->activateByRoute($request->get('_route'), $menuItems);
 }
 protected function getMenu(Request $request)
 {
     $earg = array();
     $rootItems = array($dash = new MenuItemModel('dashboard', 'Dashboard', 'avanzu_admin_dash_demo', $earg, 'fa fa-dashboard'), $form = new MenuItemModel('forms', 'Forms', 'avanzu_admin_form_demo', $earg, 'fa fa-edit'), $widgets = new MenuItemModel('widgets', 'Widgets', 'avanzu_admin_demo', $earg, 'fa fa-th', 'new'), $ui = new MenuItemModel('ui-elements', 'UI Elements', '', $earg, 'fa fa-laptop'));
     $ui->addChild(new MenuItemModel('ui-elements-general', 'General', 'avanzu_admin_ui_gen_demo', $earg))->addChild($icons = new MenuItemModel('ui-elements-icons', 'Icons', 'avanzu_admin_ui_icon_demo', $earg));
     return $this->activateByRoute($request->get('_route'), $rootItems);
 }
 protected function getMenu(Request $request)
 {
     $earg = array();
     $rootItems = array(new MenuItemModel('dashboard', 'Dashboard', 'unique_password_dashboard', $earg, 'fa fa-dashboard'), $password = new MenuItemModel('password', 'Password', '', $earg, 'fa fa-key'), $categories = new MenuItemModel('categories', 'Categories', '', $earg, 'fa fa-folder-open-o'));
     $password->addChild(new MenuItemModel('add-passwords', 'Add New', 'unique_password_add', $earg, 'fa fa-plus'))->addChild(new MenuItemModel('list-passwords', 'Retrieve', 'unique_password_list', $earg, 'fa fa-unlock'));
     $categories->addChild(new MenuItemModel('list-categories', 'List', 'unique_categories_list', $earg, 'fa fa-folder-open-o'));
     return $this->activateByRoute($request->get('_route'), $rootItems);
 }