当前位置: 首页>>代码示例>>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;未经允许,请勿转载。