Exemplo n.º 1
0
 public static function initMenu($controller)
 {
     self::$samplesMenu = array(array('label' => 'Detected', 'url' => array('/manage/samples?status=detected'), 'active' => isset($_GET['status']) && $_GET['status'] == 'detected'), array('label' => 'Clean', 'url' => array('/manage/samples?status=clean'), 'active' => isset($_GET['status']) && $_GET['status'] == 'clean'), array('label' => 'URLs', 'url' => array('/manage/urls')));
     self::$subMenuMap['bogus'] = self::$bogusMenu;
     if (in_array(strtolower($controller->action->id), array('samples', 'urls', 'bogus'))) {
         self::$subMenuMap['manage'] = self::$samplesMenu;
     } else {
         self::$subMenuMap['manage'] = self::$administrationMenu;
     }
     self::$subMenuMap['statistics'] = self::$administrationMenu;
     self::$subMenuMap['internaluser'] = array_merge(self::$administrationMenu, self::$subMenuMap['internaluser']);
     self::$subMenuMap['externaluser'] = self::$administrationMenu;
     self::$init = true;
     return true;
 }