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


PHP TabController::set_system_tabs方法代码示例

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


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

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

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

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

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

示例5: unset

         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
     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);
 }
 //Also set the tracker settings if  flavor conversion ce->pro or ce->ent
 if (isset($_SESSION['current_db_version']) && isset($_SESSION['target_db_version'])) {
     if ($_SESSION['current_db_version'] == $_SESSION['target_db_version']) {
         $_REQUEST['upgradeWizard'] = true;
         ob_start();
         include 'include/Smarty/internals/core.write_file.php';
         ob_end_clean();
         $db =& DBManagerFactory::getInstance();
         if ($ce_to_pro_ent) {
             //Also set license information
             $admin = new Administration();
             $category = 'license';
             $value = 0;
开发者ID:vsanth,项目名称:dynamic-crm,代码行数:31,代码来源:silentUpgrade_step1.php

示例6: TabController

$enabled_tabs[] = 'Leads';
$enabled_tabs[] = 'Calendar';
$enabled_tabs[] = 'Documents';
$enabled_tabs[] = 'Emails';
$enabled_tabs[] = 'Campaigns';
$enabled_tabs[] = 'Calls';
$enabled_tabs[] = 'Meetings';
$enabled_tabs[] = 'Tasks';
$enabled_tabs[] = 'Notes';
$enabled_tabs[] = 'Cases';
$enabled_tabs[] = 'Prospects';
$enabled_tabs[] = 'ProspectLists';
installerHook('pre_setSystemTabs');
require_once 'modules/MySettings/TabController.php';
$tabs = new TabController();
$tabs->set_system_tabs($enabled_tabs);
installerHook('post_setSystemTabs');
post_install_modules();
//Call rebuildSprites
if (function_exists('imagecreatetruecolor')) {
    require_once 'modules/UpgradeWizard/uw_utils.php';
    rebuildSprites(true);
}
if (count($bottle) > 0) {
    foreach ($bottle as $bottle_message) {
        $bottleMsg .= "{$bottle_message}\n";
    }
} else {
    $bottleMsg = $mod_strings['LBL_PERFORM_SUCCESS'];
}
installerHook('post_installModules');
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:31,代码来源:performSetup.php

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

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

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

示例10: TabController

 * for the specific language governing rights and limitations under the
 * License.
 *
 * All copies of the Covered Code must include on each user interface screen:
 *    (i) the "Powered by SugarCRM" logo and
 *    (ii) the SugarCRM copyright notice
 * in the same form as they appear in the distribution.  See full license for
 * requirements.
 *
 * The Original Code is: SugarCRM Open Source
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 ********************************************************************************/
/*********************************************************************************
 * Description:  TODO: To be written.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
require_once "modules/Administration/Administration.php";
global $current_user;
if (!is_admin($current_user)) {
    sugar_die("Unauthorized access to administration.");
}
require_once 'modules/MySettings/TabController.php';
$tabs = new TabController();
$tabs->set_system_tabs($_POST['group_0']);
$tabs->set_users_can_edit(isset($_REQUEST['user_edit_tabs']) && $_REQUEST['user_edit_tabs'] == 1);
header("Location: index.php?action=index&module=Administration");
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:SaveTabs.php

示例11: updateSystemTabs

 /**
  * Updates systems tabs
  *
  * @param string $action The action to take
  * @param array $installed_modules The list of modules to add for this action
  */
 protected function updateSystemTabs($action, $installed_modules)
 {
     global $moduleList;
     $controller = new TabController();
     $isSystemTabsInDB = $controller->is_system_tabs_in_db();
     if ($isSystemTabsInDB && !empty($installed_modules)) {
         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);
                 break;
         }
         if (isset($_SESSION['get_workflow_admin_modules_for_user'])) {
             return $_SESSION['get_workflow_admin_modules_for_user'];
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:37,代码来源:ModuleInstaller.php

示例12: setRevenueLineItemTab

 protected function setRevenueLineItemTab($show)
 {
     SugarAutoLoader::load('modules/MySettings/TabController.php');
     $newTB = new TabController();
     //grab the existing system tabs
     $tabs = $newTB->get_system_tabs();
     if ($show) {
         $tabs['RevenueLineItems'] = 'RevenueLineItems';
     } else {
         unset($tabs['RevenueLineItems']);
     }
     //now assign the modules to system tabs
     $newTB->set_system_tabs($tabs);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:14,代码来源:OpportunitySetup.php


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