addMeasurableItem() public method

See {@link add()}. Adds a new menu item to the measurable section of the admin menu.
Since: 3.0.0
public addMeasurableItem ( string $menuName, array $url, integer $order = 50, boolean | string $tooltip = false )
$menuName string
$url array
$order integer
$tooltip boolean | string
Beispiel #1
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::hasUserSuperUserAccess()) {
         $menu->addMeasurableItem('General_Settings', $this->urlForAction('globalSettings'), $order = 11);
     }
     if (Piwik::isUserHasSomeAdminAccess()) {
         $menu->addMeasurableItem('SitesManager_MenuManage', $this->urlForAction('index'), $order = 10);
         $type = $this->getFirstTypeIfOnlyOneIsInUse();
         if ($type) {
             $menu->rename('CoreAdminHome_MenuMeasurables', $subMenuOriginal = null, $type->getNamePlural(), $subMenuRenamed = null);
         }
     }
 }
Beispiel #2
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     $menu->addPersonalItem(null, array(), 1, false);
     $menu->addSystemItem(null, array(), 2, false);
     $menu->addMeasurableItem(null, array(), $order = 3);
     $menu->addPlatformItem(null, array(), 4, false);
     $menu->addDiagnosticItem(null, array(), $order = 5);
     $menu->addDevelopmentItem(null, array(), $order = 40);
     if (Piwik::hasUserSuperUserAccess()) {
         $menu->addSystemItem('General_GeneralSettings', $this->urlForAction('generalSettings'), $order = 5);
     }
     if (!Piwik::isUserIsAnonymous()) {
         $menu->addMeasurableItem('CoreAdminHome_TrackingCode', $this->urlForAction('trackingCodeGenerator'), $order = 12);
     }
 }
Beispiel #3
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     $userPreferences = new UserPreferences();
     $idSite = $this->getIdSite($userPreferences->getDefaultWebsiteId());
     if (Piwik::isUserHasAdminAccess($idSite)) {
         $menu->addMeasurableItem('Goals_Goals', $this->urlForAction('manage', array('idSite' => $idSite)), 40);
     }
 }
Beispiel #4
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     $userPreferences = new UserPreferences();
     $default = $userPreferences->getDefaultWebsiteId();
     $idSite = Common::getRequestVar('idSite', $default, 'int');
     if (Piwik::isUserHasAdminAccess($idSite)) {
         $menu->addMeasurableItem('CustomDimensions_CustomDimensions', $this->urlForAction('manage'), $orderId = 41);
     }
 }