Пример #1
0
 public function mainMenu(FactoryInterface $factory, array $options)
 {
     $menu = $factory->createItem('root', array('childrenAttributes' => array('class' => 'sidebar-menu')));
     $menu->addChild('Home', array('route' => 'home', 'label' => sprintf('<i class="fa fa-dashboard"></i> %s</a>', $this->translator->trans('menu.dashboard', array(), $this->translationDomain)), 'extras' => array('safe_label' => true), 'attributes' => array('class' => 'treeview')));
     $menu->addChild('Profile', array('uri' => '#', 'label' => sprintf('<i class="fa fa-user"></i> %s<i class="fa fa-angle-double-left pull-right"></i></a>', $this->translator->trans('menu.profile', array(), $this->translationDomain)), 'extras' => array('safe_label' => true), 'attributes' => array('class' => 'treeview')));
     $menu['Profile']->setChildrenAttribute('class', 'treeview-menu');
     $menu['Profile']->addChild('UserProfile', array('label' => $this->translator->trans('menu.profile', array(), $this->translationDomain), 'route' => 'ihsan_simpleadmin_index_profile', 'attributes' => array('class' => 'treeview')));
     $menu['Profile']->addChild('ChangePassword', array('label' => $this->translator->trans('menu.user.change_password', array(), $this->translationDomain), 'route' => 'ihsan_simpleadmin_index_changepassword', 'attributes' => array('class' => 'treeview')));
     if ($this->routeCollection->get('ihsan_simpleadmin_security_user_new')) {
         $this->addUserMenu($menu);
     }
     return $menu;
 }