本文整理汇总了PHP中Piwik\Menu\MenuAdmin::addManageItem方法的典型用法代码示例。如果您正苦于以下问题:PHP MenuAdmin::addManageItem方法的具体用法?PHP MenuAdmin::addManageItem怎么用?PHP MenuAdmin::addManageItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Menu\MenuAdmin
的用法示例。
在下文中一共展示了MenuAdmin::addManageItem方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureAdminMenu
public function configureAdminMenu(MenuAdmin $menu)
{
if (Piwik::isUserHasSomeAdminAccess()) {
$menu->addManageItem('UsersManager_MenuUsers', array('module' => 'UsersManager', 'action' => 'index'), $order = 2);
$menu->addManageItem('UsersManager_MenuUserSettings', array('module' => 'UsersManager', 'action' => 'userSettings'), $order = 3);
}
}
示例2: configureAdminMenu
public function configureAdminMenu(MenuAdmin $menu)
{
if (Piwik::isUserHasSomeAdminAccess()) {
$menu->addManageItem('UsersManager_MenuUsers', $this->urlForAction('index'), $order = 2);
$menu->addManageItem('UsersManager_MenuUserSettings', $this->urlForAction('userSettings'), $order = 3);
}
}
示例3: configureAdminMenu
public function configureAdminMenu(MenuAdmin $menu)
{
if (Piwik::isUserHasSomeAdminAccess()) {
$menu->addManageItem('UsersManager_MenuUsers', $this->urlForAction('index'), $order = 2);
}
if (Piwik::hasUserSuperUserAccess() && API::getInstance()->getSitesAccessFromUser('anonymous')) {
$menu->addSettingsItem('UsersManager_AnonymousUser', $this->urlForAction('anonymousSettings'), $order = 20);
}
}
示例4: configureAdminMenu
public function configureAdminMenu(MenuAdmin $menu)
{
if (Piwik::isUserHasSomeAdminAccess()) {
$type = $this->getFirstTypeIfOnlyOneIsInUse();
$menuName = 'General_Measurables';
if ($type) {
$menuName = $type->getNamePlural();
}
$menu->addManageItem($menuName, $this->urlForAction('index'), $order = 1);
}
}
示例5: 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);
}
}
示例6: configureAdminMenu
public function configureAdminMenu(MenuAdmin $menu)
{
$hasAdminAccess = Piwik::isUserHasSomeAdminAccess();
if ($hasAdminAccess) {
$menu->addManageItem(null, array(), $order = 1);
$menu->addSettingsItem(null, array(), $order = 5);
$menu->addDiagnosticItem(null, array(), $order = 10);
$menu->addDevelopmentItem(null, array(), $order = 15);
if (Piwik::hasUserSuperUserAccess()) {
$menu->addSettingsItem('General_General', $this->urlForAction('generalSettings'), $order = 6);
}
}
if (Piwik::hasUserSuperUserAccess() && SettingsManager::hasSystemPluginsSettingsForCurrentUser()) {
$menu->addSettingsItem('CoreAdminHome_PluginSettings', $this->urlForAction('adminPluginSettings'), $order = 7);
}
}
示例7: configureAdminMenu
public function configureAdminMenu(MenuAdmin $menu)
{
if (Piwik::isUserHasSomeAdminAccess()) {
$menu->addManageItem('SitesManager_Sites', $this->urlForAction('index'), $order = 1);
}
}