本文整理汇总了PHP中should_hide_iframes函数的典型用法代码示例。如果您正苦于以下问题:PHP should_hide_iframes函数的具体用法?PHP should_hide_iframes怎么用?PHP should_hide_iframes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了should_hide_iframes函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAvailableModules
function getAvailableModules($lang = '')
{
static $availableModules = array();
if (!empty($availableModules)) {
return $availableModules;
}
$specifyLanguageAppListStrings = $GLOBALS['app_list_strings'];
if (!empty($lang)) {
$specifyLanguageAppListStrings = return_app_list_strings_language($lang);
}
foreach ($GLOBALS['moduleList'] as $value) {
$availableModules[$value] = array('label' => $specifyLanguageAppListStrings['moduleList'][$value], 'value' => $value);
}
if (should_hide_iframes() && isset($availableModules['iFrames'])) {
unset($availableModules['iFrames']);
}
return $availableModules;
}
示例2: getAvailableModules
function getAvailableModules($lang = ''){
static $availableModules = array();
$GLOBALS['log']->debug('TabGroupHelper.getAvailableModules, availableModules: ' .
print_r($availableModules, TRUE));
if(!empty($availableModules))return $availableModules;
$specifyLanguageAppListStrings = $GLOBALS['app_list_strings'];
if(!empty($lang)){
$specifyLanguageAppListStrings = return_app_list_strings_language($lang);
}
$GLOBALS['log']->debug('TabGroupHelper.getAvailableModules, Globals.moduleList: ' .
print_r($GLOBALS['moduleList'], TRUE));
foreach($GLOBALS['moduleList'] as $value){
$availableModules[$value] = array('label'=>$specifyLanguageAppListStrings['moduleList'][$value], 'value'=>$value);
}
if(should_hide_iframes() && isset($availableModules['iFrames'])) {
unset($availableModules['iFrames']);
}
return $availableModules;
}
示例3: displayHeader
//.........这里部分代码省略.........
if (isset($_SESSION["authenticated_user_id"])) {
// get the current user name and id
$ss->assign("CURRENT_USER", $current_user->full_name == '' || !showFullName() ? $current_user->user_name : $current_user->full_name);
$ss->assign("CURRENT_USER_ID", $current_user->id);
// get the last viewed records
$tracker = new Tracker();
$history = $tracker->get_recently_viewed($current_user->id);
$ss->assign("recentRecords", $this->processRecentRecords($history));
}
$bakModStrings = $mod_strings;
if (isset($_SESSION["authenticated_user_id"])) {
// get the module list
$moduleTopMenu = array();
$max_tabs = $current_user->getPreference('max_tabs');
// Attempt to correct if max tabs count is extremely high.
if (!isset($max_tabs) || $max_tabs <= 0 || $max_tabs > 10) {
$max_tabs = $GLOBALS['sugar_config']['default_max_tabs'];
$current_user->setPreference('max_tabs', $max_tabs, 0, 'global');
}
/*$moduleTab = $this->_getModuleTab();
$ss->assign('MODULE_TAB',$moduleTab);*/
// See if they are using grouped tabs or not (removed in 6.0, returned in 6.1)
$user_navigation_paradigm = $current_user->getPreference('navigation_paradigm');
if (!isset($user_navigation_paradigm)) {
$user_navigation_paradigm = $GLOBALS['sugar_config']['default_navigation_paradigm'];
}
// Get the full module list for later use
foreach (query_module_access_list($current_user) as $module) {
// Bug 25948 - Check for the module being in the moduleList
if (isset($app_list_strings['moduleList'][$module])) {
$fullModuleList[$module] = $app_list_strings['moduleList'][$module];
}
}
if (!should_hide_iframes()) {
$iFrame = new iFrame();
$frames = $iFrame->lookup_frames('tab');
foreach ($frames as $key => $values) {
$fullModuleList[$key] = $values;
}
} elseif (isset($fullModuleList['iFrames'])) {
unset($fullModuleList['iFrames']);
}
if ($user_navigation_paradigm == 'gm' && isset($themeObject->group_tabs) && $themeObject->group_tabs) {
// We are using grouped tabs
require_once 'include/GroupedTabs/GroupedTabStructure.php';
$groupedTabsClass = new GroupedTabStructure();
$modules = query_module_access_list($current_user);
//handle with submoremodules
$max_tabs = $current_user->getPreference('max_tabs');
// If the max_tabs isn't set incorrectly, set it within the range, to the default max sub tabs size
if (!isset($max_tabs) || $max_tabs <= 0 || $max_tabs > 10) {
// We have a default value. Use it
if (isset($GLOBALS['sugar_config']['default_max_tabs'])) {
$max_tabs = $GLOBALS['sugar_config']['default_max_tabs'];
} else {
$max_tabs = 8;
}
}
$subMoreModules = false;
$groupTabs = $groupedTabsClass->get_tab_structure(get_val_array($modules));
// We need to put this here, so the "All" group is valid for the user's preference.
$groupTabs[$app_strings['LBL_TABGROUP_ALL']]['modules'] = $fullModuleList;
// Setup the default group tab.
$allGroup = $app_strings['LBL_TABGROUP_ALL'];
$ss->assign('currentGroupTab', $allGroup);
$currentGroupTab = $allGroup;
示例4: get_tab_structure
/**
* Prepare the tabs structure.
* Uses 'Other' tab functionality.
* If $modList is not specified, $modListHeader is used as default.
*
* @param array optional list of modules considered valid
* @param array optional array to temporarily union into the root of the tab structure
* @param bool if we set this param true, the other group tab will be returned no matter $sugar_config['other_group_tab_displayed'] is true or false
* @param bool We use label value as return array key by default. But we can set this param true, that we can use the label name as return array key.
*
* @return array the complete tab-group structure
*/
function get_tab_structure($modList = '', $patch = '', $ignoreSugarConfig = false, $labelAsKey = false)
{
global $modListHeader, $app_strings, $app_list_strings, $modInvisListActivities;
/* Use default if not provided */
if (!$modList) {
$modList =& $modListHeader;
}
/* Apply patch, use a reference if we can */
if ($patch) {
$tabStructure = $GLOBALS['tabStructure'];
foreach ($patch as $mainTab => $subModules) {
$tabStructure[$mainTab]['modules'] = array_merge($tabStructure[$mainTab]['modules'], $subModules);
}
} else {
$tabStructure =& $GLOBALS['tabStructure'];
}
$retStruct = array();
$mlhUsed = array();
//the invisible list should be merged if activities is set to be hidden
if (in_array('Activities', $modList)) {
$modList = array_merge($modList, $modInvisListActivities);
}
//Add any iFrame tabs to the 'other' group.
$moduleExtraMenu = array();
if (!should_hide_iframes()) {
$iFrame = new iFrame();
$frames = $iFrame->lookup_frames('tab');
foreach ($frames as $key => $values) {
$moduleExtraMenu[$key] = $values;
}
} else {
if (isset($modList['iFrames'])) {
unset($modList['iFrames']);
}
}
$modList = array_merge($modList, $moduleExtraMenu);
/* Only return modules which exists in the modList */
foreach ($tabStructure as $mainTab => $subModules) {
//Ensure even empty groups are returned
if ($labelAsKey) {
$retStruct[$subModules['label']]['modules'] = array();
} else {
$retStruct[$app_strings[$subModules['label']]]['modules'] = array();
}
foreach ($subModules['modules'] as $key => $subModule) {
/* Perform a case-insensitive in_array check
* and mark whichever module matched as used.
*/
foreach ($modList as $module) {
if (is_string($module) && strcasecmp($subModule, $module) === 0) {
if ($labelAsKey) {
$retStruct[$subModules['label']]['modules'][$module] = $app_list_strings['moduleList'][$module];
} else {
$retStruct[$app_strings[$subModules['label']]]['modules'][$module] = $app_list_strings['moduleList'][$module];
}
$mlhUsed[$module] = true;
break;
}
}
}
//remove the group tabs if it has no sub modules under it
if ($labelAsKey) {
if (empty($retStruct[$subModules['label']]['modules'])) {
unset($retStruct[$subModules['label']]);
}
} else {
if (empty($retStruct[$app_strings[$subModules['label']]]['modules'])) {
unset($retStruct[$app_strings[$subModules['label']]]);
}
}
}
// _pp($retStruct);
return $retStruct;
}
示例5: 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;
}