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


PHP TabController::get_tabs方法代码示例

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


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

示例1: query_module_access_list

function query_module_access_list(&$user)
{
    require_once 'modules/MySettings/TabController.php';
    $controller = new TabController();
    $tabArray = $controller->get_tabs($user);
    return $tabArray[0];
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:7,代码来源:security_utils.php

示例2: TabController

$controller = new TabController();
echo "<script>SUGAR.tabChooser.freezeOptions('display_tabs', 'hide_tabs', 'Home');</script>";
if (is_admin($current_user)) {
    $chooser->display_hide_tabs = true;
    $chooser->display_third_tabs = true;
    $chooser->args['third_name'] = 'remove_tabs';
    $chooser->args['third_label'] = $mod_strings['LBL_REMOVED_TABS'];
    //$xtpl->parse("main.tabchooser");
}
if (is_admin($current_user) || $controller->get_users_can_edit()) {
    $chooser->display_hide_tabs = true;
} else {
    $chooser->display_hide_tabs = false;
}
$chooser->args['id'] = 'edit_tabs';
$chooser->args['values_array'] = $controller->get_tabs($focus);
foreach ($chooser->args['values_array'][0] as $key => $value) {
    $chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key];
}
foreach ($chooser->args['values_array'][1] as $key => $value) {
    $chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key];
}
foreach ($chooser->args['values_array'][2] as $key => $value) {
    $chooser->args['values_array'][2][$key] = $app_list_strings['moduleList'][$key];
}
$chooser->args['left_name'] = 'display_tabs';
$chooser->args['right_name'] = 'hide_tabs';
$chooser->args['left_label'] = $mod_strings['LBL_DISPLAY_TABS'];
$chooser->args['right_label'] = $mod_strings['LBL_HIDE_TABS'];
$chooser->args['title'] = $mod_strings['LBL_EDIT_TABS'];
$xtpl->assign('TAB_CHOOSER', $chooser->display());
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php

示例3: getUserModuleList

 /**
  * Gets display module list per user defined tabs
  *
  * @return array The list of module names
  */
 public function getUserModuleList()
 {
     // Loading a standard module list
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $tabs = $controller->get_tabs($this->getCurrentUser());
     $moduleList = array_keys($tabs[0]);
     $moduleList = $this->addHomeToModuleList($moduleList);
     return $moduleList;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:MetaDataManager.php

示例4: setupAdvancedTabNavSettings

 protected function setupAdvancedTabNavSettings()
 {
     global $app_list_strings;
     /* Module Tab Chooser */
     require_once 'include/templates/TemplateGroupChooser.php';
     require_once 'modules/MySettings/TabController.php';
     $chooser = new TemplateGroupChooser();
     $controller = new TabController();
     if ($this->is_current_admin || $controller->get_users_can_edit()) {
         $chooser->display_hide_tabs = true;
     } else {
         $chooser->display_hide_tabs = false;
     }
     $chooser->args['id'] = 'edit_tabs';
     $chooser->args['values_array'] = $controller->get_tabs($this->bean);
     //Remove 'Home' module from tab configuration UI (we add it back in at top of display tabs on save)
     if (isset($chooser->args['values_array'][0]['Home'])) {
         unset($chooser->args['values_array'][0]['Home']);
     }
     if (isset($chooser->args['values_array'][1]['Home'])) {
         unset($chooser->args['values_array'][1]['Home']);
     }
     if (isset($chooser->args['values_array'][2]['Home'])) {
         unset($chooser->args['values_array'][2]['Home']);
     }
     foreach ($chooser->args['values_array'][0] as $key => $value) {
         $chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key];
     }
     foreach ($chooser->args['values_array'][1] as $key => $value) {
         $chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key];
     }
     foreach ($chooser->args['values_array'][2] as $key => $value) {
         $chooser->args['values_array'][2][$key] = $app_list_strings['moduleList'][$key];
     }
     $chooser->args['left_name'] = 'display_tabs';
     $chooser->args['right_name'] = 'hide_tabs';
     $chooser->args['left_label'] = translate('LBL_DISPLAY_TABS', 'Users');
     $chooser->args['right_label'] = translate('LBL_HIDE_TABS', 'Users');
     require_once 'include/SugarSmarty/plugins/function.sugar_help.php';
     $chooser->args['title'] = translate('LBL_EDIT_TABS', 'Users') . smarty_function_sugar_help(array("text" => translate('LBL_CHOOSE_WHICH', 'Users')), $ss);
     $this->ss->assign('TAB_CHOOSER', $chooser->display());
     $this->ss->assign('CHOOSER_SCRIPT', 'set_chooser();');
     $this->ss->assign('CHOOSE_WHICH', translate('LBL_CHOOSE_WHICH', 'Users'));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:44,代码来源:UserViewHelper.php

示例5: setupAdvancedTabNavSettings

 protected function setupAdvancedTabNavSettings()
 {
     global $app_list_strings;
     // Grouped tabs?
     $useGroupTabs = $this->bean->getPreference('navigation_paradigm');
     if (!isset($useGroupTabs)) {
         if (!isset($GLOBALS['sugar_config']['default_navigation_paradigm'])) {
             $GLOBALS['sugar_config']['default_navigation_paradigm'] = 'gm';
         }
         $useGroupTabs = $GLOBALS['sugar_config']['default_navigation_paradigm'];
     }
     $this->ss->assign("USE_GROUP_TABS", $useGroupTabs == 'gm' ? 'checked' : '');
     $user_subpanel_tabs = $this->bean->getPreference('subpanel_tabs');
     if (isset($user_subpanel_tabs)) {
         $this->ss->assign("SUBPANEL_TABS", $user_subpanel_tabs ? 'checked' : '');
     } else {
         $this->ss->assign("SUBPANEL_TABS", $GLOBALS['sugar_config']['default_subpanel_tabs'] ? 'checked' : '');
     }
     /* Module Tab Chooser */
     require_once 'include/templates/TemplateGroupChooser.php';
     require_once 'modules/MySettings/TabController.php';
     $chooser = new TemplateGroupChooser();
     $controller = new TabController();
     if ($this->is_current_admin || $controller->get_users_can_edit()) {
         $chooser->display_hide_tabs = true;
     } else {
         $chooser->display_hide_tabs = false;
     }
     $chooser->args['id'] = 'edit_tabs';
     $chooser->args['values_array'] = $controller->get_tabs($this->bean);
     foreach ($chooser->args['values_array'][0] as $key => $value) {
         $chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key];
     }
     foreach ($chooser->args['values_array'][1] as $key => $value) {
         $chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key];
     }
     foreach ($chooser->args['values_array'][2] as $key => $value) {
         $chooser->args['values_array'][2][$key] = $app_list_strings['moduleList'][$key];
     }
     $chooser->args['left_name'] = 'display_tabs';
     $chooser->args['right_name'] = 'hide_tabs';
     $chooser->args['left_label'] = translate('LBL_DISPLAY_TABS', 'Users');
     $chooser->args['right_label'] = translate('LBL_HIDE_TABS', 'Users');
     require_once 'include/Smarty/plugins/function.sugar_help.php';
     $chooser->args['title'] = translate('LBL_EDIT_TABS', 'Users') . smarty_function_sugar_help(array("text" => translate('LBL_CHOOSE_WHICH', 'Users')), $ss);
     $this->ss->assign('TAB_CHOOSER', $chooser->display());
     $this->ss->assign('CHOOSER_SCRIPT', 'set_chooser();');
     $this->ss->assign('CHOOSE_WHICH', translate('LBL_CHOOSE_WHICH', 'Users'));
 }
开发者ID:BMLP,项目名称:memoryhole-ansible,代码行数:49,代码来源:UserViewHelper.php

示例6: setupAdvancedTabNavSettings

 protected function setupAdvancedTabNavSettings()
 {
     global $app_list_strings;
     // Grouped tabs?
     $useGroupTabs = $this->bean->getPreference('navigation_paradigm');
     if (!isset($useGroupTabs)) {
         if (!isset($GLOBALS['sugar_config']['default_navigation_paradigm'])) {
             $GLOBALS['sugar_config']['default_navigation_paradigm'] = 'gm';
         }
         $useGroupTabs = $GLOBALS['sugar_config']['default_navigation_paradigm'];
     }
     $this->ss->assign("USE_GROUP_TABS", $useGroupTabs == 'gm' ? 'checked' : '');
     $user_max_tabs = $this->bean->getPreference('max_tabs');
     if (isset($user_max_tabs) && $user_max_tabs > 0) {
         $this->ss->assign("MAX_TAB", $user_max_tabs);
     } elseif (SugarThemeRegistry::current()->maxTabs > 0) {
         $this->ss->assign("MAX_TAB", SugarThemeRegistry::current()->maxTabs);
     } else {
         $this->ss->assign("MAX_TAB", $GLOBALS['sugar_config']['default_max_tabs']);
     }
     $this->ss->assign("MAX_TAB_OPTIONS", range(1, !empty($GLOBALS['sugar_config']['default_max_tabs']) && $GLOBALS['sugar_config']['default_max_tabs'] > 10 ? $GLOBALS['sugar_config']['default_max_tabs'] : 10));
     $user_subpanel_tabs = $this->bean->getPreference('subpanel_tabs');
     if (isset($user_subpanel_tabs)) {
         $this->ss->assign("SUBPANEL_TABS", $user_subpanel_tabs ? 'checked' : '');
     } else {
         $this->ss->assign("SUBPANEL_TABS", $GLOBALS['sugar_config']['default_subpanel_tabs'] ? 'checked' : '');
     }
     /* Module Tab Chooser */
     require_once 'include/templates/TemplateGroupChooser.php';
     require_once 'modules/MySettings/TabController.php';
     $chooser = new TemplateGroupChooser();
     $controller = new TabController();
     if ($this->is_current_admin || $controller->get_users_can_edit()) {
         $chooser->display_hide_tabs = true;
     } else {
         $chooser->display_hide_tabs = false;
     }
     $chooser->args['id'] = 'edit_tabs';
     $chooser->args['values_array'] = $controller->get_tabs($this->bean);
     foreach ($chooser->args['values_array'][0] as $key => $value) {
         $chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key];
     }
     foreach ($chooser->args['values_array'][1] as $key => $value) {
         $chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key];
     }
     foreach ($chooser->args['values_array'][2] as $key => $value) {
         $chooser->args['values_array'][2][$key] = $app_list_strings['moduleList'][$key];
     }
     $chooser->args['left_name'] = 'display_tabs';
     $chooser->args['right_name'] = 'hide_tabs';
     $chooser->args['left_label'] = translate('LBL_DISPLAY_TABS', 'Users');
     $chooser->args['right_label'] = translate('LBL_HIDE_TABS', 'Users');
     $chooser->args['title'] = translate('LBL_EDIT_TABS', 'Users') . ' <!--not_in_theme!--><img border="0" src="themes/default/images/helpInline.gif" onmouseover="return overlib(\'Choose which tabs are displayed.\', FGCLASS, \'olFgClass\', CGCLASS, \'olCgClass\', BGCLASS, \'olBgClass\', TEXTFONTCLASS, \'olFontClass\', CAPTIONFONTCLASS, \'olCapFontClass\', CLOSEFONTCLASS, \'olCloseFontClass\', WIDTH, -1, NOFOLLOW, \'ol_nofollow\' );" onmouseout="return nd();"/>';
     $this->ss->assign('TAB_CHOOSER', $chooser->display());
     $this->ss->assign('CHOOSER_SCRIPT', 'set_chooser();');
     $this->ss->assign('CHOOSE_WHICH', translate('LBL_CHOOSE_WHICH', 'Users'));
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:57,代码来源:UserViewHelper.php

示例7: TabController

 }
 if (isset($_POST['user_theme'])) {
     $focus->setPreference('user_theme', $_POST['user_theme'], 0, 'global');
     $_SESSION['authenticated_user_theme'] = $_POST['user_theme'];
 }
 if (isset($_POST['user_module_favicon'])) {
     $focus->setPreference('module_favicon', $_POST['user_module_favicon'], 0, 'global');
 } else {
     $focus->setPreference('module_favicon', '', 0, 'global');
 }
 // BR-237 Force a reauth for user metadata changes so that these changes
 // are picked up by clients immediately
 $refreshMetadata = false;
 $tabs = new TabController();
 // Get the current display tabs to see if any of them are different
 $curTabs = $tabs->get_tabs($current_user);
 $curDisplay = array_keys($curTabs[0]);
 if (isset($DISPLAY_ARR['display_tabs'])) {
     //Put home back in.  It needs to be first display module in Sugar 7
     array_unshift($DISPLAY_ARR['display_tabs'], 'Home');
     // Order is relevant on display modules, use identical (===) comparison
     // If DISPLAY_ARR changed, so did HIDE_ARR
     // Save tabs only if there are changes
     if (array_values($DISPLAY_ARR['display_tabs']) !== array_values($curDisplay)) {
         $refreshMetadata = true;
         $tabs->set_user_tabs($DISPLAY_ARR['display_tabs'], $focus, 'display');
     }
 }
 if (isset($HIDE_ARR['hide_tabs'])) {
     $tabs->set_user_tabs($HIDE_ARR['hide_tabs'], $focus, 'hide');
 } else {
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:Save.php


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