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


PHP TabController::get_tabs_system方法代码示例

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


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

示例1: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $mod_strings;
     global $app_list_strings;
     global $app_strings;
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $tabs = $controller->get_tabs_system();
     $enabled = [];
     foreach ($tabs[0] as $key => $value) {
         $enabled[] = ["module" => $key, 'label' => translate($key)];
     }
     $disabled = [];
     foreach ($tabs[1] as $key => $value) {
         $disabled[] = ["module" => $key, 'label' => translate($key)];
     }
     $user_can_edit = $controller->get_users_can_edit();
     $this->ss->assign('APP', $GLOBALS['app_strings']);
     $this->ss->assign('MOD', $GLOBALS['mod_strings']);
     $this->ss->assign('user_can_edit', $user_can_edit);
     $this->ss->assign('enabled_tabs', json_encode($enabled));
     $this->ss->assign('disabled_tabs', json_encode($disabled));
     $this->ss->assign('title', $this->getModuleTitle(false));
     //get list of all subpanels and panels to hide
     $mod_list_strings_key_to_lower = array_change_key_case($app_list_strings['moduleList']);
     $panels_arr = SubPanelDefinitions::get_all_subpanels();
     $hidpanels_arr = SubPanelDefinitions::get_hidden_subpanels();
     if (!$hidpanels_arr || !is_array($hidpanels_arr)) {
         $hidpanels_arr = [];
     }
     //create array of subpanels to show, used to create Drag and Drop widget
     $enabled = [];
     foreach ($panels_arr as $key) {
         if (empty($key)) {
             continue;
         }
         $key = strtolower($key);
         $enabled[] = ["module" => $key, "label" => $mod_list_strings_key_to_lower[$key]];
     }
     //now create array of subpanels to hide for use in Drag and Drop widget
     $disabled = [];
     foreach ($hidpanels_arr as $key) {
         if (empty($key)) {
             continue;
         }
         $key = strtolower($key);
         $disabled[] = ["module" => $key, "label" => $mod_list_strings_key_to_lower[$key]];
     }
     $this->ss->assign('enabled_panels', json_encode($enabled));
     $this->ss->assign('disabled_panels', json_encode($disabled));
     echo $this->ss->fetch('modules/Administration/templates/ConfigureTabs.tpl');
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:55,代码来源:view.configuretabs.php

示例2: TabController

 /**
  * Examine the application to determine which modules have been enabled..
  *
  * @param array $availModules An array of all the modules the user already has access to.
  * @return array Modules enabled within the application.
  */
 function get_visible_modules($availModules)
 {
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $tabs = $controller->get_tabs_system();
     return $this->getModulesFromList($tabs[0], $availModules);
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:13,代码来源:SugarWebServiceUtilv3_1.php

示例3: TabController

 /**
  * Examine the application to determine which modules have been enabled..
  *
  * @param array $availModules An array of all the modules the user already has access to.
  * @return array Modules enabled within the application.
  */
 function get_visible_modules($availModules)
 {
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $tabs = $controller->get_tabs_system();
     $enabled_modules = array();
     $availModulesKey = array_flip($availModules);
     foreach ($tabs[0] as $key => $value) {
         if (isset($availModulesKey[$key])) {
             $enabled_modules[] = $key;
         }
     }
     return $enabled_modules;
 }
开发者ID:vsanth,项目名称:dynamic-crm,代码行数:20,代码来源:SugarWebServiceUtilv3.php

示例4: upgradeDisplayedTabsAndSubpanels

/**
 * upgradeDisplayedTabsAndSubpanels
 *
 * @param $version String value of current system version (pre upgrade)
 */
function upgradeDisplayedTabsAndSubpanels($version)
{
    if ($version < '620') {
        logThis('start upgrading system displayed tabs and subpanels');
        require_once 'modules/MySettings/TabController.php';
        $tc = new TabController();
        //grab the existing system tabs
        $tabs = $tc->get_tabs_system();
        //add Calls, Meetings, Tasks, Notes, Prospects (Targets) and ProspectLists (Target Lists)
        //to displayed tabs unless explicitly set to hidden
        $modules_to_add = array('Calls', 'Meetings', 'Tasks', 'Notes', 'Prospects', 'ProspectLists');
        $added_tabs = array();
        foreach ($modules_to_add as $module) {
            $tabs[0][$module] = $module;
            $added_tabs[] = $module;
        }
        logThis('calling set_system_tabs on TabController to add tabs: ' . var_export($added_tabs, true));
        $tc->set_system_tabs($tabs[0]);
        logThis('finish upgrading system displayed tabs and subpanels');
    }
}
开发者ID:omusico,项目名称:sugar_work,代码行数:26,代码来源:uw_utils.php

示例5: TemplateGroupChooser

$chooser = new TemplateGroupChooser();
$controller = new TabController();
$chooser->args['id'] = 'edit_tabs';
if (isset($_REQUEST['record'])) {
    $chooser->args['values_array'][0] = $focus->query_modules(1);
    $chooser->args['values_array'][1] = $focus->query_modules(0);
    foreach ($chooser->args['values_array'][0] as $key => $value) {
        $chooser->args['values_array'][0][$value] = $app_list_strings['moduleList'][$value];
        unset($chooser->args['values_array'][0][$key]);
    }
    foreach ($chooser->args['values_array'][1] as $key => $value) {
        $chooser->args['values_array'][1][$value] = $app_list_strings['moduleList'][$value];
        unset($chooser->args['values_array'][1][$key]);
    }
} else {
    $chooser->args['values_array'] = $controller->get_tabs_system();
    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];
    }
}
$chooser->args['left_name'] = 'display_tabs';
$chooser->args['right_name'] = 'hide_tabs';
$chooser->args['left_label'] = $mod_strings['LBL_ALLOWED_MODULES'];
$chooser->args['right_label'] = $mod_strings['LBL_DISALLOWED_MODULES'];
$chooser->args['title'] = $mod_strings['LBL_ASSIGN_MODULES'];
$xtpl->assign("TAB_CHOOSER", $chooser->display());
$xtpl->parse("main");
$xtpl->out("main");
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:EditView.php

示例6: getAllowedReportModules

/**
 * Helper function for this file.
 */
function getAllowedReportModules(&$local_modListHeader, $skipCache = false)
{
    static $reports_mod = null;
    if (isset($reports_mod) && !$skipCache) {
        return $reports_mod;
    }
    require_once "modules/MySettings/TabController.php";
    $controller = new TabController();
    $tabs = $controller->get_tabs_system();
    $all_modules = array_merge($tabs[0], $tabs[1]);
    if (!is_array($all_modules)) {
        return array();
    }
    global $report_map, $beanList, $report_include_modules;
    if (empty($beanList)) {
        require 'include/modules.php';
    }
    $report_modules = array();
    $subModuleCheckArray = array("Tasks", "Calls", "Meetings", "Notes");
    $subModuleProjectArray = array("ProjectTask");
    foreach ($beanList as $key => $value) {
        if (isset($all_modules[$key])) {
            $report_modules[$key] = $value;
        }
        //need to include subpanel only modules
        if (!empty($report_include_modules[$key])) {
            $report_modules[$key] = $value;
        }
        if (in_array($key, $subModuleCheckArray) && (array_key_exists("Calendar", $all_modules) || array_key_exists("Activities", $all_modules))) {
            $report_modules[$key] = $value;
        }
        if (in_array($key, $subModuleProjectArray) && array_key_exists("Project", $all_modules)) {
            $report_modules[$key] = $value;
        }
        if ($key == 'Users' || $key == 'Teams' || $key == 'EmailAddresses') {
            $report_modules[$key] = $value;
        }
        if ($key == 'Releases' || $key == 'CampaignLog' || $key == 'Manufacturers') {
            $report_modules[$key] = $value;
        }
    }
    global $beanFiles;
    // Bug 38864 - Parse the reportmoduledefs.php file for a list of modules we should include or disclude from this list
    //             Provides contents of $exemptModules and $additionalModules arrays
    $exemptModules = array();
    $additionalModules = array();
    foreach (SugarAutoLoader::existingCustom('modules/Reports/metadata/reportmodulesdefs.php') as $file) {
        include $file;
    }
    foreach ($report_modules as $module => $class_name) {
        if (!isset($beanFiles[$class_name]) || in_array($module, $exemptModules)) {
            unset($report_modules[$module]);
        }
    }
    foreach ($additionalModules as $module) {
        if (isset($beanList[$module])) {
            $report_modules[$module] = $beanList[$module];
        }
    }
    if (should_hide_iframes() && isset($report_modules['iFrames'])) {
        unset($report_modules['iFrames']);
    }
    return $report_modules;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:67,代码来源:config.php

示例7: TabController

 ********************************************************************************/
require_once 'modules/Administration/Forms.php';
global $mod_strings;
global $app_list_strings;
global $app_strings;
global $current_user;
if (!is_admin($current_user)) {
    sugar_die("Unauthorized access to administration.");
}
$title = get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $mod_strings['LBL_CONFIGURE_TABS'], true);
global $theme;
global $currentModule;
$GLOBALS['log']->info("Administration ConfigureTabs view");
require_once "modules/MySettings/TabController.php";
$controller = new TabController();
$tabs = $controller->get_tabs_system();
$groups = array();
$groups[$mod_strings['LBL_DISPLAY_TABS']] = array();
foreach ($tabs[0] as $key => $value) {
    $groups[$mod_strings['LBL_DISPLAY_TABS']][$key] = array('label' => '<span>' . $app_list_strings['moduleList'][$key] . '</span>');
}
$groups[$mod_strings['LBL_HIDE_TABS']] = array();
foreach ($tabs[1] as $key => $value) {
    $groups[$mod_strings['LBL_HIDE_TABS']][$key] = array('label' => $app_list_strings['moduleList'][$key]);
}
global $app_list_strings, $app_strings;
$smarty = new Sugar_Smarty();
$user_can_edit = $controller->get_users_can_edit();
$smarty->assign('APP', $GLOBALS['app_strings']);
$smarty->assign('MOD', $GLOBALS['mod_strings']);
$smarty->assign('title', $title);
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:31,代码来源:ConfigureTabs.php

示例8: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $mod_strings;
     global $app_list_strings;
     global $app_strings;
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $tabs = $controller->get_tabs_system();
     // Remove Home module from UI.  We add it back to front of display tab list on save.
     if (isset($tabs[0]['Home'])) {
         unset($tabs[0]['Home']);
     }
     if (isset($tabs[1]['Home'])) {
         unset($tabs[1]['Home']);
     }
     $enabled = array();
     foreach ($tabs[0] as $key => $value) {
         $enabled[] = array("module" => $key, 'label' => translate($key));
     }
     $disabled = array();
     foreach ($tabs[1] as $key => $value) {
         $disabled[] = array("module" => $key, 'label' => translate($key));
     }
     $user_can_edit = $controller->get_users_can_edit();
     $this->ss->assign('APP', $GLOBALS['app_strings']);
     $this->ss->assign('MOD', $GLOBALS['mod_strings']);
     $this->ss->assign('user_can_edit', $user_can_edit);
     $this->ss->assign('enabled_tabs', json_encode($enabled));
     $this->ss->assign('disabled_tabs', json_encode($disabled));
     $this->ss->assign('title', $this->getModuleTitle(false));
     //get list of all subpanels and panels to hide
     $mod_list_strings_key_to_lower = array_change_key_case($app_list_strings['moduleList']);
     $panels_arr = SubPanelDefinitions::get_all_subpanels();
     $hidpanels_arr = SubPanelDefinitions::get_hidden_subpanels();
     if (!$hidpanels_arr || !is_array($hidpanels_arr)) {
         $hidpanels_arr = array();
     }
     //create array of subpanels to show, used to create Drag and Drop widget
     $enabled = array();
     foreach ($panels_arr as $key) {
         if (empty($key)) {
             continue;
         }
         $key = strtolower($key);
         $enabled[] = array("module" => $key, "label" => $mod_list_strings_key_to_lower[$key]);
     }
     //now create array of subpanels to hide for use in Drag and Drop widget
     $disabled = array();
     foreach ($hidpanels_arr as $key) {
         if (empty($key)) {
             continue;
         }
         $key = strtolower($key);
         // we need this here for with RLI's are disabled as they shouldn't be seen in the list
         if ($key == 'revenuelineitems' && in_array('RevenueLineItems', $GLOBALS['modInvisList'])) {
             continue;
         }
         $disabled[] = array("module" => $key, "label" => $mod_list_strings_key_to_lower[$key]);
     }
     $this->ss->assign('enabled_panels', json_encode($enabled));
     $this->ss->assign('disabled_panels', json_encode($disabled));
     echo $this->ss->fetch('modules/Administration/templates/ConfigureTabs.tpl');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:66,代码来源:view.configuretabs.php


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