当前位置: 首页>>代码示例>>PHP>>正文


PHP MenuAdmin::addPlatformItem方法代码示例

本文整理汇总了PHP中Piwik\Menu\MenuAdmin::addPlatformItem方法的典型用法代码示例。如果您正苦于以下问题:PHP MenuAdmin::addPlatformItem方法的具体用法?PHP MenuAdmin::addPlatformItem怎么用?PHP MenuAdmin::addPlatformItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik\Menu\MenuAdmin的用法示例。


在下文中一共展示了MenuAdmin::addPlatformItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: configureAdminMenu

 public function configureAdminMenu(MenuAdmin $menu)
 {
     $hasSuperUserAcess = Piwik::hasUserSuperUserAccess();
     $isAnonymous = Piwik::isUserIsAnonymous();
     $isMarketplaceEnabled = CorePluginsAdmin::isMarketplaceEnabled();
     $pluginsUpdateMessage = '';
     $themesUpdateMessage = '';
     if ($hasSuperUserAcess && $isMarketplaceEnabled) {
         $marketplace = new Marketplace();
         $pluginsHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = false);
         $themesHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = true);
         if (!empty($pluginsHavingUpdate)) {
             $pluginsUpdateMessage = sprintf(' (%d)', count($pluginsHavingUpdate));
         }
         if (!empty($themesHavingUpdate)) {
             $themesUpdateMessage = sprintf(' (%d)', count($themesHavingUpdate));
         }
     }
     if (!$isAnonymous) {
         $menu->addPlatformItem(null, "", $order = 7);
     }
     if ($hasSuperUserAcess) {
         $menu->addPlatformItem(Piwik::translate('General_Plugins') . $pluginsUpdateMessage, array('module' => 'CorePluginsAdmin', 'action' => 'plugins', 'activated' => ''), $order = 1);
         $menu->addPlatformItem(Piwik::translate('CorePluginsAdmin_Themes') . $themesUpdateMessage, array('module' => 'CorePluginsAdmin', 'action' => 'themes', 'activated' => ''), $order = 3);
     }
     if ($this->isAllowedToSeeMarketPlace()) {
         $menu->addPlatformItem('CorePluginsAdmin_Marketplace', array('module' => 'CorePluginsAdmin', 'action' => 'extend', 'activated' => ''), $order = 5);
     }
 }
开发者ID:emersonmatsumoto,项目名称:piwik,代码行数:29,代码来源:Menu.php

示例2: configureAdminMenu

 public function configureAdminMenu(MenuAdmin $menu)
 {
     $menu->addPlatformItem('General_API', $this->urlForAction('listAllAPI', array('segment' => false)), 7, Piwik::translate('API_TopLinkTooltip'));
     if (Piwik::isUserIsAnonymous()) {
         $menu->addPlatformItem('API_Glossary', $this->urlForAction('glossary', array('segment' => false)), 50);
     }
 }
开发者ID:piwik,项目名称:piwik,代码行数:7,代码来源:Menu.php

示例3: configureAdminMenu

 public function configureAdminMenu(MenuAdmin $menu)
 {
     $hasSuperUserAcess = Piwik::hasUserSuperUserAccess();
     $isAnonymous = Piwik::isUserIsAnonymous();
     $isMarketplaceEnabled = CorePluginsAdmin::isMarketplaceEnabled();
     $pluginsUpdateMessage = '';
     if ($hasSuperUserAcess && $isMarketplaceEnabled) {
         $marketplace = new Marketplace();
         $pluginsHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = false);
         $themesHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = true);
         if (!empty($pluginsHavingUpdate)) {
             $pluginsUpdateMessage = sprintf(' (%d)', count($pluginsHavingUpdate) + count($themesHavingUpdate));
         }
     }
     if (!$isAnonymous) {
         $menu->addPlatformItem(null, "", $order = 7);
     }
     if ($hasSuperUserAcess) {
         $menu->addManageItem(Piwik::translate('General_Plugins') . $pluginsUpdateMessage, $this->urlForAction('plugins', array('activated' => '')), $order = 4);
     }
     if (Piwik::hasUserSuperUserAccess() && CorePluginsAdmin::isMarketplaceEnabled()) {
         $menu->addManageItem('CorePluginsAdmin_Marketplace', $this->urlForAction('browsePlugins', array('activated' => '')), $order = 12);
     }
 }
开发者ID:CaptainSharf,项目名称:SSAD_Project,代码行数:24,代码来源:Menu.php


注:本文中的Piwik\Menu\MenuAdmin::addPlatformItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。