本文整理汇总了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));
}
}
示例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'));
}
示例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'));
}
示例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);
}
示例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']));
}
}
}
示例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++;
}
}
}
}
示例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']));
}
}
}
示例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;
}
示例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']));
}
}
}
示例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']));
}
}
}
示例11: addMenu
function addMenu()
{
Piwik_AddMenu('General_Visitors', 'UserSettings_SubmenuSettings', array('module' => 'UserSettings'));
}
示例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);
}
示例13: addMenu
public function addMenu()
{
Piwik_AddMenu('Actions_Actions', 'Trails!', array('module' => 'Trails', 'action' => 'index'), true, $order = 20);
}
示例14: addMenu
function addMenu()
{
Piwik_AddMenu('General_Visitors', 'UserCountry_SubmenuLocations', array('module' => 'UserCountry', 'action' => 'index'));
}
示例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'));
}