當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Piwik_AddMenu函數代碼示例

本文整理匯總了PHP中Piwik_AddMenu函數的典型用法代碼示例。如果您正苦於以下問題:PHP Piwik_AddMenu函數的具體用法?PHP Piwik_AddMenu怎麽用?PHP Piwik_AddMenu使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Piwik_AddMenu函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addMenus

 function addMenus()
 {
     $menus = array('Data tables' => 'dataTables', 'Evolution graph' => 'evolutionGraph', 'Bar graph' => 'barGraph', 'Pie graph' => 'pieGraph', 'Tag clouds' => 'tagClouds', 'Sparklines' => 'sparklines', 'Misc' => 'misc');
     foreach ($menus as $subMenu => $action) {
         Piwik_AddMenu('UI Framework', $subMenu, array('module' => 'ExampleUI', 'action' => $action));
     }
 }
開發者ID:ntulip,項目名稱:piwik,代碼行數:7,代碼來源:ExampleUI.php

示例2: addMenus

 function addMenus()
 {
     Piwik_AddMenu('Actions_Actions', 'Actions_SubmenuPages', array('module' => 'Actions', 'action' => 'getPageUrls'));
     Piwik_AddMenu('Actions_Actions', 'Actions_SubmenuPageTitles', array('module' => 'Actions', 'action' => 'getPageTitles'));
     Piwik_AddMenu('Actions_Actions', 'Actions_SubmenuOutlinks', array('module' => 'Actions', 'action' => 'getOutlinks'));
     Piwik_AddMenu('Actions_Actions', 'Actions_SubmenuDownloads', array('module' => 'Actions', 'action' => 'getDownloads'));
 }
開發者ID:Doluci,項目名稱:tomatocart,代碼行數:7,代碼來源:Actions.php

示例3: addMenus

	function addMenus()
	{
		Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuEvolution', array('module' => 'Referers'));
		Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuSearchEngines', array('module' => 'Referers', 'action' => 'getSearchEnginesAndKeywords'));
		Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuWebsites', array('module' => 'Referers', 'action' => 'getWebsites'));
		Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuCampaigns', array('module' => 'Referers', 'action' => 'getCampaigns'));
	}
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:7,代碼來源:Referers.php

示例4: addMenus

 /**
  * Adds Web Analytics menus
  */
 function addMenus()
 {
     Piwik_AddMenu('Referers_Referers', '', array('module' => 'Referers', 'action' => 'index'), true, 20);
     Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuOverview', array('module' => 'Referers', 'action' => 'index'), true, 1);
     Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuSearchEngines', array('module' => 'Referers', 'action' => 'getSearchEnginesAndKeywords'), true, 2);
     Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuWebsites', array('module' => 'Referers', 'action' => 'indexWebsites'), true, 3);
     Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuCampaigns', array('module' => 'Referers', 'action' => 'indexCampaigns'), true, 4);
 }
開發者ID:nomoto-ubicast,項目名稱:piwik,代碼行數:11,代碼來源:Referers.php

示例5: addMenus

 function addMenus()
 {
     $goals = Piwik_Tracker_GoalManager::getGoalDefinitions(Piwik_Common::getRequestVar('idSite'));
     if (count($goals) == 0) {
         Piwik_AddMenu('Goals', 'Add a new Goal', array('module' => 'Goals', 'action' => 'addNewGoal'));
     } else {
         Piwik_AddMenu('Goals', 'Overview', array('module' => 'Goals'));
         foreach ($goals as $goal) {
             Piwik_AddMenu('Goals', str_replace('%', '%%', $goal['name']), array('module' => 'Goals', 'action' => 'goalReport', 'idGoal' => $goal['idgoal']));
         }
     }
 }
開發者ID:klando,項目名稱:pgpiwik,代碼行數:12,代碼來源:Goals.php

示例6: addMenus

 public function addMenus()
 {
     Piwik_AddMenu('Dashboard_Dashboard', '', array('module' => 'Dashboard', 'action' => 'embeddedIndex', 'idDashboard' => 1), true, 5);
     if (!Piwik::isUserIsAnonymous()) {
         $login = Piwik::getCurrentUserLogin();
         $dashboards = self::getAllDashboards($login);
         if (count($dashboards) > 1) {
             $pos = 0;
             foreach ($dashboards as $dashboard) {
                 Piwik_AddMenu('Dashboard_Dashboard', $dashboard['name'], array('module' => 'Dashboard', 'action' => 'embeddedIndex', 'idDashboard' => $dashboard['iddashboard']), true, $pos);
                 $pos++;
             }
         }
     }
 }
開發者ID:nomoto-ubicast,項目名稱:piwik,代碼行數:15,代碼來源:Dashboard.php

示例7: addMenus

 function addMenus()
 {
     $idSite = Piwik_Common::getRequestVar('idSite');
     $experiments = Piwik_ABTests_API::getInstance()->getExperiments($idSite);
     $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
     if (count($experiments) == 0 && count($goals) > 0) {
         Piwik_AddMenu(Piwik_Translate('ABTests_ABTests'), Piwik_Translate('ABTests_CreateExperiment'), array('module' => 'ABTests', 'action' => 'addNewExperiment'));
     } elseif (count($experiments) == 0) {
         # messge saying you need goals to create experiments
     } else {
         Piwik_AddMenu('ABTests_ABTests', 'ABTests_Overview', array('module' => 'ABTests'));
         foreach ($experiments as $experiment) {
             Piwik_AddMenu('ABTests_ABTests', str_replace('%', '%%', $experiment['name']), array('module' => 'ABTests', 'action' => 'experimentReport', 'idExperiment' => $experiment['idexperiment']));
         }
     }
 }
開發者ID:Basilakis,項目名稱:abtests,代碼行數:16,代碼來源:ABTests.php

示例8: Piwik_GetMenu

function Piwik_GetMenu()
{
    global $mainMenu;
    global $menuEditsToApply;
    global $menuRenameToApply;
    // we apply the list of edits we've registered so far
    foreach ($menuEditsToApply as $edit) {
        $mainMenuToEdit = $edit[0];
        $subMenuToEdit = $edit[1];
        $newUrl = $edit[2];
        if (!isset($mainMenu[$mainMenuToEdit][$subMenuToEdit])) {
            Piwik_AddMenu($mainMenuToEdit, $subMenuToEdit, $newUrl);
        } else {
            $mainMenu[$mainMenuToEdit][$subMenuToEdit] = $newUrl;
        }
    }
    // we now apply the menu rename
    foreach ($menuRenameToApply as $rename) {
        $mainMenuOriginal = $rename[0];
        $subMenuOriginal = $rename[1];
        $mainMenuRenamed = $rename[2];
        $subMenuRenamed = $rename[3];
        if (isset($mainMenu[$mainMenuOriginal][$subMenuOriginal])) {
            $save = $mainMenu[$mainMenuOriginal][$subMenuOriginal];
            unset($mainMenu[$mainMenuOriginal][$subMenuOriginal]);
            $mainMenu[$mainMenuRenamed][$subMenuRenamed] = $save;
        }
    }
    // we now do some cleaning on the menu
    foreach ($mainMenu as $key => &$element) {
        if (is_null($element)) {
            unset($mainMenu[$key]);
        } else {
            // we want to move some submenus in the first position
            $priority = array('Overview', 'Evolution');
            foreach ($priority as $name) {
                if (isset($element[$name])) {
                    $newElement = array($name => $element[$name]);
                    unset($element[$name]);
                    $element = $newElement + $element;
                }
            }
            $element['_url'] = current($element);
        }
    }
    return $mainMenu;
}
開發者ID:Doluci,項目名稱:tomatocart,代碼行數:47,代碼來源:Menu.php

示例9: addMenus

 function addMenus()
 {
     $idSite = Piwik_Common::getRequestVar('idSite');
     $funnels = Piwik_Funnels_API::getInstance()->getFunnels($idSite);
     $goalsWithoutFunnels = Piwik_Funnels_API::getInstance()->getGoalsWithoutFunnels($idSite);
     if (count($funnels) == 0 && count($goalsWithoutFunnels) > 0) {
         Piwik_AddMenu('Funnels', Piwik_Translate('Funnels_AddNewFunnel'), array('module' => 'Funnels', 'action' => 'addNewFunnel'));
     } else {
         Piwik_AddMenu('Funnels_Funnels', 'Funnels_Overview', array('module' => 'Funnels'));
         foreach ($funnels as $funnel) {
             Piwik_AddMenu('Funnels_Funnels', str_replace('%', '%%', $funnel['goal_name']), array('module' => 'Funnels', 'action' => 'funnelReport', 'idFunnel' => $funnel['idfunnel']));
         }
     }
 }
開發者ID:jamesvl,項目名稱:funnels,代碼行數:14,代碼來源:Funnels.php

示例10: addMenus

 function addMenus()
 {
     $idSite = Piwik_Common::getRequestVar('idSite', null, 'int');
     $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
     $mainGoalMenu = $this->getGoalCategoryName($idSite);
     $site = new Piwik_Site($idSite);
     if (count($goals) == 0) {
         Piwik_AddMenu($mainGoalMenu, '', array('module' => 'Goals', 'action' => $site->isEcommerceEnabled() ? 'ecommerceReport' : 'addNewGoal', 'idGoal' => $site->isEcommerceEnabled() ? Piwik_Archive::LABEL_ECOMMERCE_ORDER : null), true, 25);
         if ($site->isEcommerceEnabled()) {
             Piwik_AddMenu($mainGoalMenu, 'Goals_Ecommerce', array('module' => 'Goals', 'action' => 'ecommerceReport', 'idGoal' => Piwik_Archive::LABEL_ECOMMERCE_ORDER), true, 1);
         }
         Piwik_AddMenu($mainGoalMenu, 'Goals_AddNewGoal', array('module' => 'Goals', 'action' => 'addNewGoal'));
     } else {
         Piwik_AddMenu($mainGoalMenu, '', array('module' => 'Goals', 'action' => $site->isEcommerceEnabled() ? 'ecommerceReport' : 'index', 'idGoal' => $site->isEcommerceEnabled() ? Piwik_Archive::LABEL_ECOMMERCE_ORDER : null), true, 25);
         if ($site->isEcommerceEnabled()) {
             Piwik_AddMenu($mainGoalMenu, 'Goals_Ecommerce', array('module' => 'Goals', 'action' => 'ecommerceReport', 'idGoal' => Piwik_Archive::LABEL_ECOMMERCE_ORDER), true, 1);
         }
         Piwik_AddMenu($mainGoalMenu, 'Goals_GoalsOverview', array('module' => 'Goals', 'action' => 'index'), true, 2);
         foreach ($goals as $goal) {
             Piwik_AddMenu($mainGoalMenu, str_replace('%', '%%', Piwik_TranslationWriter::clean($goal['name'])), array('module' => 'Goals', 'action' => 'goalReport', 'idGoal' => $goal['idgoal']));
         }
     }
 }
開發者ID:nomoto-ubicast,項目名稱:piwik,代碼行數:23,代碼來源:Goals.php

示例11: addMenu

 function addMenu()
 {
     Piwik_AddMenu('General_Visitors', 'UserSettings_SubmenuSettings', array('module' => 'UserSettings'));
 }
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:4,代碼來源:UserSettings.php

示例12: addMenu

 function addMenu()
 {
     Piwik_AddMenu('General_Visitors', '', array('module' => 'VisitsSummary', 'action' => 'index'), true, 10);
     Piwik_AddMenu('General_Visitors', 'VisitsSummary_SubmenuOverview', array('module' => 'VisitsSummary', 'action' => 'index'), true, 1);
 }
開發者ID:nnnnathann,項目名稱:piwik,代碼行數:5,代碼來源:VisitsSummary.php

示例13: addMenu

 public function addMenu()
 {
     Piwik_AddMenu('Actions_Actions', 'Trails!', array('module' => 'Trails', 'action' => 'index'), true, $order = 20);
 }
開發者ID:rasmusbergpalm,項目名稱:Trails,代碼行數:4,代碼來源:Trails.php

示例14: addMenu

 function addMenu()
 {
     Piwik_AddMenu('General_Visitors', 'UserCountry_SubmenuLocations', array('module' => 'UserCountry', 'action' => 'index'));
 }
開發者ID:0h546f6f78696342756e4e59,項目名稱:piwik,代碼行數:4,代碼來源:UserCountry.php

示例15: addMenu

 /** Menu hook */
 public function addMenu()
 {
     Piwik_AddMenu('Referers_Referers', 'LatestReferrers_LatestLinks', array('module' => 'LatestReferrers', 'action' => 'links'));
     Piwik_AddMenu('Referers_Referers', 'LatestReferrers_LatestSearches', array('module' => 'LatestReferrers', 'action' => 'searches'));
 }
開發者ID:BeezyT,項目名稱:piwik-latestreferrers,代碼行數:6,代碼來源:LatestReferrers.php


注:本文中的Piwik_AddMenu函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。