Beispiel #1
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('Referrers_Referrers', '', array('module' => 'Referrers', 'action' => 'index'), true, 20);
     $menu->add('Referrers_Referrers', 'General_Overview', array('module' => 'Referrers', 'action' => 'index'), true, 1);
     $menu->add('Referrers_Referrers', 'Referrers_SubmenuSearchEngines', array('module' => 'Referrers', 'action' => 'getSearchEnginesAndKeywords'), true, 2);
     $menu->add('Referrers_Referrers', 'Referrers_SubmenuWebsites', array('module' => 'Referrers', 'action' => 'indexWebsites'), true, 3);
     $menu->add('Referrers_Referrers', 'Referrers_Campaigns', array('module' => 'Referrers', 'action' => 'indexCampaigns'), true, 4);
 }
Beispiel #2
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('Dashboard_Dashboard', '', array('module' => 'Dashboard', 'action' => 'embeddedIndex', 'idDashboard' => 1), true, 5);
     if (!Piwik::isUserIsAnonymous()) {
         $login = Piwik::getCurrentUserLogin();
         $dashboard = new Dashboard();
         $dashboards = $dashboard->getAllDashboards($login);
         $pos = 0;
         foreach ($dashboards as $dashboard) {
             $menu->add('Dashboard_Dashboard', $dashboard['name'], array('module' => 'Dashboard', 'action' => 'embeddedIndex', 'idDashboard' => $dashboard['iddashboard']), true, $pos);
             $pos++;
         }
     }
 }
Beispiel #3
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $idSite = Common::getRequestVar('idSite', null, 'int');
     $goals = API::getInstance()->getGoals($idSite);
     $mainGoalMenu = $this->getGoalCategoryName($idSite);
     $site = new Site($idSite);
     if (count($goals) == 0) {
         $menu->add($mainGoalMenu, '', array('module' => 'Goals', 'action' => $site->isEcommerceEnabled() ? 'ecommerceReport' : 'addNewGoal', 'idGoal' => $site->isEcommerceEnabled() ? Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER : null), true, 25);
         if ($site->isEcommerceEnabled()) {
             $menu->add($mainGoalMenu, 'Goals_Ecommerce', array('module' => 'Goals', 'action' => 'ecommerceReport', 'idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER), true, 1);
         }
         $menu->add($mainGoalMenu, 'Goals_AddNewGoal', array('module' => 'Goals', 'action' => 'addNewGoal'));
     } else {
         $menu->add($mainGoalMenu, '', array('module' => 'Goals', 'action' => $site->isEcommerceEnabled() ? 'ecommerceReport' : 'index', 'idGoal' => $site->isEcommerceEnabled() ? Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER : null), true, 25);
         if ($site->isEcommerceEnabled()) {
             $menu->add($mainGoalMenu, 'Goals_Ecommerce', array('module' => 'Goals', 'action' => 'ecommerceReport', 'idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER), true, 1);
         }
         $menu->add($mainGoalMenu, 'Goals_GoalsOverview', array('module' => 'Goals', 'action' => 'index'), true, 2);
         $group = new Group();
         foreach ($goals as $goal) {
             $subMenuName = str_replace('%', '%%', Translate::clean($goal['name']));
             $params = array('module' => 'Goals', 'action' => 'goalReport', 'idGoal' => $goal['idgoal']);
             $tooltip = sprintf('%s (id = %d)', $subMenuName, $goal['idgoal']);
             if (count($goals) <= 3) {
                 $menu->add($mainGoalMenu, $subMenuName, $params, true, 50, $tooltip);
             } else {
                 $group->add($subMenuName, $params, $tooltip);
             }
         }
         if (count($goals) > 3) {
             $menu->addGroup($mainGoalMenu, 'Goals_ChooseGoal', $group, $orderId = 50, $tooltip = false);
         }
     }
 }
Beispiel #4
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Actions', '', array('module' => 'Actions', 'action' => 'indexPageUrls'), true, 15);
     $menu->add('General_Actions', 'General_Pages', array('module' => 'Actions', 'action' => 'indexPageUrls'), true, 1);
     $menu->add('General_Actions', 'Actions_SubmenuPagesEntry', array('module' => 'Actions', 'action' => 'indexEntryPageUrls'), true, 2);
     $menu->add('General_Actions', 'Actions_SubmenuPagesExit', array('module' => 'Actions', 'action' => 'indexExitPageUrls'), true, 3);
     $menu->add('General_Actions', 'Actions_SubmenuPageTitles', array('module' => 'Actions', 'action' => 'indexPageTitles'), true, 4);
     $menu->add('General_Actions', 'General_Outlinks', array('module' => 'Actions', 'action' => 'indexOutlinks'), true, 6);
     $menu->add('General_Actions', 'General_Downloads', array('module' => 'Actions', 'action' => 'indexDownloads'), true, 7);
     $actions = new Actions();
     if ($actions->isSiteSearchEnabled()) {
         $menu->add('General_Actions', 'Actions_SubmenuSitesearch', array('module' => 'Actions', 'action' => 'indexSiteSearch'), true, 5);
     }
 }
Beispiel #5
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $idSite = Common::getRequestVar('idSite', null, 'int');
     $goals = API::getInstance()->getGoals($idSite);
     $mainGoalMenu = $this->getGoalCategoryName($idSite);
     $site = new Site($idSite);
     if (count($goals) == 0) {
         $menu->add($mainGoalMenu, '', array('module' => 'Goals', 'action' => $site->isEcommerceEnabled() ? 'ecommerceReport' : 'addNewGoal', 'idGoal' => $site->isEcommerceEnabled() ? Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER : null), true, 25);
         if ($site->isEcommerceEnabled()) {
             $menu->add($mainGoalMenu, 'Goals_Ecommerce', array('module' => 'Goals', 'action' => 'ecommerceReport', 'idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER), true, 1);
         }
         $menu->add($mainGoalMenu, 'Goals_AddNewGoal', array('module' => 'Goals', 'action' => 'addNewGoal'));
     } else {
         $menu->add($mainGoalMenu, '', array('module' => 'Goals', 'action' => $site->isEcommerceEnabled() ? 'ecommerceReport' : 'index', 'idGoal' => $site->isEcommerceEnabled() ? Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER : null), true, 25);
         if ($site->isEcommerceEnabled()) {
             $menu->add($mainGoalMenu, 'Goals_Ecommerce', array('module' => 'Goals', 'action' => 'ecommerceReport', 'idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER), true, 1);
         }
         $menu->add($mainGoalMenu, 'Goals_GoalsOverview', array('module' => 'Goals', 'action' => 'index'), true, 2);
         foreach ($goals as $goal) {
             $menu->add($mainGoalMenu, str_replace('%', '%%', Translate::clean($goal['name'])), array('module' => 'Goals', 'action' => 'goalReport', 'idGoal' => $goal['idgoal']));
         }
     }
 }
Beispiel #6
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Actions', 'Events_Events', array('module' => 'Events', 'action' => 'index'), true, 30);
 }
Beispiel #7
0
 /**
  * By default a menu item will be added to the reporting menu if a {@link $menuTitle} is set. If you want to
  * customize the way the item is added or modify any other behavior you can overwrite this method. For instance
  * in case you need to add additional url properties beside module and action which are added by default.
  * @param \Piwik\Menu\MenuReporting $menu
  * @api
  */
 public function configureReportingMenu(MenuReporting $menu)
 {
     if ($this->menuTitle) {
         $action = $this->getMenuControllerAction();
         $menu->add($this->category, $this->menuTitle, array('module' => $this->module, 'action' => $action), $this->isEnabled(), $this->order);
     }
 }
Beispiel #8
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'DevicesDetection_submenu', array('module' => 'DevicesDetection', 'action' => 'index'));
 }
Beispiel #9
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'General_Settings', array('module' => 'UserSettings', 'action' => 'index'));
 }
Beispiel #10
0
 /**
  * By default a menu item will be added to the reporting menu if a {@link $menuTitle} is set. If you want to
  * customize the way the item is added or modify any other behavior you can overwrite this method. For instance
  * in case you need to add additional url properties beside module and action which are added by default.
  * @param \Piwik\Menu\MenuReporting $menu
  * @api
  */
 public function configureReportingMenu(MenuReporting $menu)
 {
     if ($this->menuTitle) {
         $action = 'menu' . ucfirst($this->action);
         $menu->add($this->category, $this->menuTitle, array('module' => $this->module, 'action' => $action), $this->isEnabled(), $this->order);
     }
 }
Beispiel #11
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'CustomVariables_CustomVariables', array('module' => 'CustomVariables', 'action' => 'index'), $display = true, $order = 50);
 }
Beispiel #12
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', '', array('module' => 'VisitsSummary', 'action' => 'index'), true, 10);
     $menu->add('General_Visitors', 'General_Overview', array('module' => 'VisitsSummary', 'action' => 'index'), true, 1);
 }
Beispiel #13
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'UserCountry_SubmenuLocations', array('module' => 'UserCountry', 'action' => 'index'));
 }
Beispiel #14
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'VisitTime_SubmenuTimes', array('module' => 'VisitTime', 'action' => 'index'), true, $order = 65);
 }
Beispiel #15
0
 private function addSubMenu(MenuReporting $menu, $subMenu, $action, $order)
 {
     $menu->add('UI Framework', $subMenu, array('module' => 'ExampleUI', 'action' => $action), true, $order);
 }
Beispiel #16
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'Live_VisitorLog', array('module' => 'Live', 'action' => 'indexVisitorLog'), true, $order = 5);
 }
Beispiel #17
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'VisitFrequency_SubmenuFrequency', array('module' => 'VisitFrequency', 'action' => 'index'), true, $order = 55);
 }
Beispiel #18
0
 public function configureReportingMenu(MenuReporting $menu)
 {
     $menu->add('General_Visitors', 'UserCountryMap_RealTimeMap', array('module' => 'UserCountryMap', 'action' => 'realtimeWorldMap'), true, $order = 70);
 }