• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TabController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了TabController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: 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


示例3: display

 /**
  * This function loads portal config vars from db and sets them for the view
  * @see SugarView::display() for more info
  */
 function display()
 {
     $portalFields = array('appStatus' => 'offline', 'logoURL' => '', 'maxQueryResult' => '20', 'maxSearchQueryResult' => '5', 'defaultUser' => '');
     $userList = get_user_array();
     $userList[''] = '';
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $disabledModulesFlag = false;
     $disabledModules = array_diff($controller->getAllPortalTabs(), $controller->getPortalTabs());
     if (!empty($disabledModules)) {
         $disabledModulesFlag = true;
         array_walk($disabledModules, function (&$item) {
             $item = translate($item);
         });
     }
     $admin = Administration::getSettings();
     $portalConfig = $admin->getConfigForModule('portal', 'support', true);
     $portalConfig['appStatus'] = !empty($portalConfig['on']) ? 'online' : 'offline';
     $smarty = new Sugar_Smarty();
     $smarty->assign('disabledDisplayModulesList', $disabledModules);
     $smarty->assign('disabledDisplayModules', $disabledModulesFlag);
     foreach ($portalFields as $fieldName => $fieldDefault) {
         if (isset($portalConfig[$fieldName])) {
             $smarty->assign($fieldName, html_entity_decode($portalConfig[$fieldName]));
         } else {
             $smarty->assign($fieldName, $fieldDefault);
         }
     }
     $smarty->assign('userList', $userList);
     $smarty->assign('welcome', $GLOBALS['mod_strings']['LBL_SYNCP_WELCOME']);
     $smarty->assign('mod', $GLOBALS['mod_strings']);
     $smarty->assign('siteURL', $GLOBALS['sugar_config']['site_url']);
     if (isset($_REQUEST['label'])) {
         $smarty->assign('label', $_REQUEST['label']);
     }
     $options = !empty($GLOBALS['system_config']->settings['system_portal_url']) ? $GLOBALS['system_config']->settings['system_portal_url'] : 'https://';
     $smarty->assign('options', $options);
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main("sugarportal")');
     $ajax->addCrumb(ucwords(translate('LBL_PORTAL_CONFIGURE')), '');
     $ajax->addSection('center', translate('LBL_SUGARPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portalconfig.tpl'));
     $GLOBALS['log']->debug($smarty->fetch('modules/ModuleBuilder/tpls/portalconfig.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:48,代码来源:view.portalconfig.php


示例4: run

 public function run()
 {
     if (!($this->from_flavor == 'ce' && $this->toFlavor('pro'))) {
         return;
     }
     //check to see if there are any new files that need to be added to systems tab
     //retrieve old modules list
     $this->log('check to see if new modules exist');
     if (empty($this->state['old_modules'])) {
         $this->log('No old modules info, skipping it');
         return;
     } else {
         $oldModuleList = $this->state['old_modules'];
     }
     $newModuleList = array();
     include 'include/modules.php';
     $newModuleList = $moduleList;
     //include tab controller
     require_once 'modules/MySettings/TabController.php';
     $newTB = new TabController();
     //make sure new modules list has a key we can reference directly
     $newModuleList = $newTB->get_key_array($newModuleList);
     $oldModuleList = $newTB->get_key_array($oldModuleList);
     //iterate through list and remove commonalities to get new modules
     foreach ($newModuleList as $remove_mod) {
         if (in_array($remove_mod, $oldModuleList)) {
             unset($newModuleList[$remove_mod]);
         }
     }
     $must_have_modules = array('Activities' => 'Activities', 'Calendar' => 'Calendar', 'Reports' => 'Reports', 'Quotes' => 'Quotes', 'Products' => 'Products', 'Forecasts' => 'Forecasts', 'Contracts' => 'Contracts', 'KBDocuments' => 'KBDocuments');
     $newModuleList = array_merge($newModuleList, $must_have_modules);
     //new modules list now has left over modules which are new to this install, so lets add them to the system tabs
     $this->log('new modules to add are ' . var_export($newModuleList, true));
     //grab the existing system tabs
     $tabs = $newTB->get_system_tabs();
     //add the new tabs to the array
     foreach ($newModuleList as $nm) {
         $tabs[$nm] = $nm;
     }
     //now assign the modules to system tabs
     $newTB->set_system_tabs($tabs);
     $this->log('module tabs updated');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:43,代码来源:4_AddModulesToCE.php


示例5: setUpPortal

 /**
  * Sets up Portal.
  *
  * @param array $settings (optional) the array of portal settings.
  */
 public function setUpPortal(array $settings = array())
 {
     // Initialize `MySettings_tab` (setting containing the list of module
     // tabs) if not set.
     $tabController = new TabController();
     $tabController->getPortalTabs();
     $portalFields = array('defaultUser', 'appName', 'logoURL', 'serverUrl', 'maxQueryResult', 'maxSearchQueryResult');
     $portalConfig = $this->getDefaultPortalSettings();
     foreach ($portalFields as $field) {
         if (isset($settings[$field])) {
             $portalConfig[$field] = $settings[$field];
         }
     }
     $portalConfig['appStatus'] = 'online';
     $portalConfig['on'] = 1;
     $this->savePortalSettings($portalConfig);
     $this->setUpUser();
     $this->refreshCache();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:24,代码来源:parser.portalconfig.php


示例6: run

 public function run()
 {
     if ($this->fromFlavor('ent') && version_compare($this->from_version, '7.6.0', '>=')) {
         return;
     }
     //include tab controller
     require_once 'modules/MySettings/TabController.php';
     $newTB = new TabController();
     $must_have_modules = array('pmse_Project', 'pmse_Inbox', 'pmse_Business_Rules', 'pmse_Emails_Templates');
     //grab the existing system tabs
     $tabs = $newTB->get_system_tabs();
     //add the new tabs to the array
     foreach ($must_have_modules as $nm) {
         $tabs[$nm] = $nm;
     }
     //now assign the modules to system tabs
     $newTB->set_system_tabs($tabs);
     $this->log('module tabs updated with pmse');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:19,代码来源:4_AddPMSEModules.php


示例7: __construct

 function __construct($view_class = null)
 {
     if ($view_class === null) {
         $view_class = "PlacesView";
     }
     $this->session = Project::getSession();
     parent::__construct($view_class);
     $this->_view->assign('tab_list', TabController::getOwnTabs(true));
     $this->user = Project::getUser()->getShowedUser();
     $this->_view->assign('user_profile', $this->user->data());
     $this->_view->assign('session', $this->session);
     $this->_view->assign('user_default_avatar', $this->user->getUserAvatar($this->user->id));
 }
开发者ID:amanai,项目名称:next24,代码行数:13,代码来源:PlacesController.php


示例8: action_savetabs

 public function action_savetabs()
 {
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     require_once 'modules/MySettings/TabController.php';
     global $current_user, $app_strings;
     if (!is_admin($current_user)) {
         sugar_die($app_strings['ERR_NOT_ADMIN']);
     }
     // handle the tabs listing
     $toDecode = html_entity_decode($_REQUEST['enabled_tabs'], ENT_QUOTES);
     $enabled_tabs = json_decode($toDecode);
     $tabs = new TabController();
     $tabs->set_system_tabs($enabled_tabs);
     $tabs->set_users_can_edit(isset($_REQUEST['user_edit_tabs']) && $_REQUEST['user_edit_tabs'] == 1);
     // handle the subpanels
     if (isset($_REQUEST['disabled_tabs'])) {
         $disabledTabs = json_decode(html_entity_decode($_REQUEST['disabled_tabs'], ENT_QUOTES));
         $disabledTabsKeyArray = TabController::get_key_array($disabledTabs);
         SubPanelDefinitions::set_hidden_subpanels($disabledTabsKeyArray);
     }
     header("Location: index.php?module=Administration&action=ConfigureTabs");
 }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:22,代码来源:controller.php


示例9: action_savetabs

 public function action_savetabs()
 {
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     require_once 'modules/MySettings/TabController.php';
     global $current_user, $app_strings, $modInvisList;
     if (!is_admin($current_user)) {
         sugar_die($app_strings['ERR_NOT_ADMIN']);
     }
     // handle the tabs listing
     $toDecode = html_entity_decode($_REQUEST['enabled_tabs'], ENT_QUOTES);
     $enabled_tabs = json_decode($toDecode);
     // Add Home back in so that it always appears first in Sugar 7
     array_unshift($enabled_tabs, 'Home');
     $tabs = new TabController();
     $tabs->set_system_tabs($enabled_tabs);
     $tabs->setPortalTabs(array_values(array_intersect($enabled_tabs, $tabs->getAllPortalTabs())));
     $tabs->set_users_can_edit(isset($_REQUEST['user_edit_tabs']) && $_REQUEST['user_edit_tabs'] == 1);
     // handle the subpanels
     if (isset($_REQUEST['disabled_tabs'])) {
         $disabledTabs = json_decode(html_entity_decode($_REQUEST['disabled_tabs'], ENT_QUOTES));
         $disabledTabsKeyArray = TabController::get_key_array($disabledTabs);
         //Never show Project subpanels if Project module is hidden
         if (!in_array('project', $disabledTabsKeyArray) && in_array('Project', $modInvisList)) {
             $disabledTabsKeyArray[] = 'project';
         }
         // if RLI is hidden, always hide the RLI subpanel.
         if (!in_array('revenuelineitems', $disabledTabsKeyArray) && in_array('RevenueLineItems', $modInvisList)) {
             $disabledTabsKeyArray[] = 'revenuelineitems';
         }
         SubPanelDefinitions::set_hidden_subpanels($disabledTabsKeyArray);
     }
     // Only rebuild the relevent metadata sections.
     MetaDataManager::refreshSectionCache(MetaDataManager::MM_MODULESINFO, array('base'));
     MetaDataManager::refreshSectionCache(MetaDataManager::MM_HIDDENSUBPANELS, array('base'));
     if (!headers_sent()) {
         header("Location: index.php?module=Administration&action=ConfigureTabs");
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:38,代码来源:controller.php


示例10: BaseBlogData

 function BaseBlogData(&$info)
 {
     $request = Project::getRequest();
     $request_user_id = (int) Project::getUser()->getShowedUser()->id;
     if ($request_user_id <= 0) {
         Project::getResponse()->redirect($request->createUrl('Index', 'Index', null, false));
     }
     $user_id = (int) Project::getUser()->getDbUser()->id;
     if ($request_user_id === $user_id) {
         $v = new BlogViewSocieties();
         $v->ControlPanel();
         $info['control_panel'] = $v->parse();
         $info['blog_owner'] = true;
     } else {
         $info['control_panel'] = null;
         $info['blog_owner'] = false;
     }
     $info['tab_list'] = TabController::getOwnTabs(false, false, false, false, false, false, false, true);
     // User blog tree
     $blog_model = Project::getUser()->getShowedUser()->getBlogSocieties();
     $tree_model = new BlogTreeModelSocieties();
     $info['branch_list'] = $tree_model->getBranchList($blog_model->id, $user_id);
     $info['blog_info']['title'] = $blog_model->title;
 }
开发者ID:amanai,项目名称:next24,代码行数:24,代码来源:BlogSocietiesController.php


示例11: TabController

 }
 if (isset($_POST['user_subpanel_tabs'])) {
     $focus->setPreference('subpanel_tabs', $_POST['user_subpanel_tabs'], 0, 'global');
 } else {
     $focus->setPreference('subpanel_tabs', '', 0, 'global');
 }
 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');
 }
 $tabs = new TabController();
 if (isset($_POST['display_tabs'])) {
     $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 {
     $tabs->set_user_tabs(array(), $focus, 'hide');
 }
 if (is_admin($current_user)) {
     if (isset($REMOVE_ARR['remove_tabs'])) {
         $tabs->set_user_tabs($REMOVE_ARR['remove_tabs'], $focus, 'remove');
     } else {
         $tabs->set_user_tabs(array(), $focus, 'remove');
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:31,代码来源:Save.php


示例12: LastListAction

 function LastListAction($info = array())
 {
     $this->BaseSiteData();
     $info['tab_list'] = TabController::getMainAlbumTabs(false, true, false);
     $request_user_id = (int) Project::getUser()->getShowedUser()->id;
     $user_id = (int) Project::getUser()->getDbUser()->id;
     $album_id = isset($album_id) && (int) $album_id > 0 ? $album_id : (int) Project::getRequest()->getKeyByNumber(0);
     $this->BaseAlbumData($info, $album_id);
     $photo_model = new PhotoModel();
     $pager = new DbPager(Project::getRequest()->getValueByNumber(1), $this->getParam('last_photo_per_page', self::DEFAULT_PHOTO_PER_PAGE));
     $photo_model->setPager($pager);
     $list = $photo_model->loadAll($request_user_id, $album_id);
     $this->checkImages($list);
     $info['photo_list'] = $list;
     $info['list_pager'] = $photo_model->getPager();
     $info['list_controller'] = 'Photo';
     $info['list_action'] = 'Album';
     $info['list_user'] = null;
     $this->_view->LastList($info);
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:21,代码来源:PhotoController.php


示例13: 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


示例14: UpdateSystemTabs

function UpdateSystemTabs($action, $installed_modules)
{
    require_once "modules/MySettings/TabController.php";
    $controller = new TabController();
    $isSystemTabsInDB = $controller->is_system_tabs_in_db();
    if ($isSystemTabsInDB && !empty($installed_modules)) {
        global $moduleList;
        switch ($action) {
            case 'Restore':
                $currentTabs = $controller->get_system_tabs();
                foreach ($installed_modules as $module) {
                    if (in_array($module, $currentTabs)) {
                        unset($currentTabs[$module]);
                    }
                }
                $controller->set_system_tabs($currentTabs);
                break;
            case 'Add':
                $currentTabs = $controller->get_system_tabs();
                foreach ($installed_modules as $module) {
                    if (!in_array($module, $currentTabs)) {
                        $currentTabs[$module] = $module;
                    }
                }
                $controller->set_system_tabs($currentTabs);
            default:
                break;
        }
    }
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:30,代码来源:ModuleInstaller.php


示例15: addNewSystemTabsFromUpgrade

function addNewSystemTabsFromUpgrade($from_dir)
{
    global $path;
    if (isset($_SESSION['upgrade_from_flavor'])) {
        //check to see if there are any new files that need to be added to systems tab
        //retrieve old modules list
        logThis('check to see if new modules exist', $path);
        $oldModuleList = array();
        $newModuleList = array();
        include $from_dir . '/include/modules.php';
        $oldModuleList = $moduleList;
        include 'include/modules.php';
        $newModuleList = $moduleList;
        //include tab controller
        require_once 'modules/MySettings/TabController.php';
        $newTB = new TabController();
        //make sure new modules list has a key we can reference directly
        $newModuleList = $newTB->get_key_array($newModuleList);
        $oldModuleList = $newTB->get_key_array($oldModuleList);
        //iterate through list and remove commonalities to get new modules
        foreach ($newModuleList as $remove_mod) {
            if (in_array($remove_mod, $oldModuleList)) {
                unset($newModuleList[$remove_mod]);
            }
        }
        //new modules list now has left over modules which are new to this install, so lets add them to the system tabs
        logThis('new modules to add are ' . var_export($newModuleList, true), $path);
        //grab the existing system tabs
        $tabs = $newTB->get_system_tabs();
        //add the new tabs to the array
        foreach ($newModuleList as $nm) {
            $tabs[$nm] = $nm;
        }
        //now assign the modules to system tabs
        $newTB->set_system_tabs($tabs);
        logThis('module tabs updated', $path);
    }
}
开发者ID:Terradex,项目名称:sugar,代码行数:38,代码来源:uw_utils.php


示例16: get_set_focus_js

if (isset($_REQUEST['return_id'])) {
    $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
// handle Create $module then Cancel
if (empty($_REQUEST['return_id'])) {
    $xtpl->assign("RETURN_ACTION", 'index');
}
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_chooser_js() . get_validate_record_js());
$xtpl->assign("ID", $focus->id);
$xtpl->assign("NAME", $focus->name);
$xtpl->assign("DESCRIPTION", $focus->description);
require_once "include/templates/TemplateGroupChooser.php";
require_once "modules/MySettings/TabController.php";
$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) {
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:EditView.php


示例17: AddSubjectAction

 public function AddSubjectAction()
 {
     //$request = Project::getRequest();
     $data = array();
     $this->BaseSiteData();
     $article_model = new ArticleModel();
     $data['tab_list'] = TabController::getMainArticleTabs(false, false, false, true);
     if (count($article_model->loadByParentId(0, array(ARTICLE_COMPETITION_STATUS::NEW_ARTICLE), Project::getUser()->getDbUser()->id)) >= 5) {
         $data['message'] = "Нельзя добавить больше 5 тем за конкурс";
         $data['active'] = false;
     } else {
         $data['active'] = true;
         $n = Node::by_key('', 'articles_tree');
         $data['tree'] = $n->getBranch();
     }
     $this->_view->AddSubject($data);
     $this->_view->parse();
 }
开发者ID:amanai,项目名称:next24,代码行数:18,代码来源:ArticleController.php


示例18: getParentModulesOfSubpanel

 function getParentModulesOfSubpanel($subpanel)
 {
     global $moduleList, $beanFiles, $beanList, $module;
     //use tab controller function to get module list with named keys
     require_once "modules/MySettings/TabController.php";
     require_once "include/SubPanel/SubPanelDefinitions.php";
     $modules_to_check = TabController::get_key_array($moduleList);
     //change case to match subpanel processing later on
     $modules_to_check = array_change_key_case($modules_to_check);
     $spd = '';
     $spd_arr = array();
     //iterate through modules and build subpanel array
     foreach ($modules_to_check as $mod_name) {
         //skip if module name is not in bean list, otherwise get the bean class name
         if (!isset($beanList[$mod_name])) {
             continue;
         }
         $class = $beanList[$mod_name];
         //skip if class name is not in file list, otherwise require the bean file and create new class
         if (!isset($beanFiles[$class]) || !file_exists($beanFiles[$class])) {
             continue;
         }
         //retrieve subpanels for this bean
         require_once $beanFiles[$class];
         $bean_class = new $class();
         //create new subpanel definition instance and get list of tabs
         $spd = new SubPanelDefinitions($bean_class);
         if (isset($spd->layout_defs['subpanel_setup'][strtolower($subpanel)]['module'])) {
             $spd_arr[] = $mod_name;
         }
     }
     return $spd_arr;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:33,代码来源:StudioModule.php


示例19: get_visible_modules

 /**
  * 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


示例20: array

    $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'reports_to_id', 'name' => 'reports_to_name'));
    $json = getJSONobj();
    $encoded_popup_request_data = $json->encode($popup_request_data);
    $xtpl->assign('encoded_popup_request_data', $encoded_popup_request_data);
    //
    ///////////////////////////////////////
    $reports_to_change_button_html = '<input type="button"' . " title=\"{$app_strings['LBL_SELECT_BUTTON_TITLE']}\"" . " accesskey=\"{$app_strings['LBL_SELECT_BUTTON_KEY']}\"" . " value=\"{$app_strings['LBL_SELECT_BUTTON_LABEL']}\"" . ' tabindex="5" class="button" name="btn1"' . " onclick='open_popup(\"Users\", 600, 400, \"\", true, false, {$encoded_popup_request_data});'" . "' />";
} else {
    $xtpl->assign('IS_ADMIN_DISABLED', 'disabled="disabled"');
}
$xtpl->assign('REPORTS_TO_CHANGE_BUTTON', $reports_to_change_button_html);
/* Module Tab Chooser */
require_once 'include/templates/TemplateGroupChooser.php';
require_once 'modules/MySettings/TabController.php';
$chooser = new TemplateGroupChooser();
$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);
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP TabSet类代码示例发布时间:2022-05-23
下一篇:
PHP Tab类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap