/** * @return \Symfony\Component\HttpFoundation\Response * @Route("/admin/sidebar", name="adminSidebar") */ public function sidebarAction() { $sidebarEvent = new MenuEvent(); $sidebarEvent->addChild(new MenuItem("Dashboard", "dashboard", "fa fa-dashboard")); $this->get("bundle_service")->triggerEvent("pixi.admin_sidebar_entries", $sidebarEvent); if ($this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { $aclMenu = new Menu(array(new MenuItem("Users", 'user', 'fa fa-user'), new MenuItem("Roles", 'role', 'fa fa-key'), new MenuItem("Permissions", 'permission', 'fa fa-check')), "Access Control", null, "fa fa-lock fa-fw"); $sidebarEvent->addChild($aclMenu); } $sidebar_entries = $sidebarEvent->getData()->getChildren(); return $this->render("PixiCoreBundle:Admin:sidebar.html.twig", array("sidebar_entries" => $sidebar_entries)); }
public function adminSidebar(MenuEvent $event) { $event->addChild(new Menu(array(new MenuItem("Item", "item", "fa fa-cube fa-fw"), new MenuItem("Offer", "offer", "fa fa-certificate fa-fw"), new MenuItem("Shop", "shop", "fa fa-shopping-cart fa-fw")), "Loyalty Manager", null, "fa fa-gift fa-fw")); }
public function adminSidebar(MenuEvent $event) { $event->addChild(new Menu(array(new MenuItem("Accounts", "accounts", "fa fa-cube fa-fw"), new MenuItem("Fees", "fees", "fa fa-cube fa-fw"), new MenuItem("Transfers", "transfers", "fa fa-cube fa-fw")), "IHT Settings", null, "fa fa-cog fa-fw")); $event->addChild(new MenuItem("Payments", "payments", "fa fa-cube fa-fw")); }