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


PHP return_application_language函数代码示例

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


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

示例1: setUp

 public function setUp()
 {
     global $beanList, $beanFiles;
     include 'include/modules.php';
     //Reload langauge strings
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
     //Create an anonymous user for login purposes/
     $this->_user = new User();
     $this->_user->retrieve('1');
     $GLOBALS['current_user'] = $this->_user;
     self::$helperObject = new APIv3Helper();
     if (file_exists(sugar_cached('modules/unified_search_modules.php'))) {
         $this->unified_search_modules_content = file_get_contents(sugar_cached('modules/unified_search_modules.php'));
         unlink(sugar_cached('modules/unified_search_modules.php'));
     }
     require_once 'modules/Home/UnifiedSearchAdvanced.php';
     $unifiedSearchAdvanced = new UnifiedSearchAdvanced();
     $_REQUEST['enabled_modules'] = 'Accounts,Contacts,Opportunities';
     $unifiedSearchAdvanced->saveGlobalSearchSettings();
     $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM calls WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM tasks WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM meetings WHERE name like 'UNIT TEST%' ");
     //$this->useOutputBuffering = false;
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:29,代码来源:RESTAPI3Test.php

示例2: setUp

 public function setUp()
 {
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     //Reload langauge strings
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
     //Create an anonymous user for login purposes/
     $this->_user = SugarTestUserUtilities::createAnonymousUser();
     $this->_admin_user = SugarTestUserUtilities::createAnonymousUser();
     $this->_admin_user->status = 'Active';
     $this->_admin_user->is_admin = 1;
     $this->_admin_user->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
     $GLOBALS['current_user'] = $this->_user;
     self::$helperObject = new APIv3Helper();
     //Disable access to the website field.
     $this->aclRole = new ACLRole();
     $this->aclRole->name = "Unit Test";
     $this->aclRole->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
     $this->aclRole->set_relationship('acl_roles_users', array('role_id' => $this->aclRole->id, 'user_id' => $this->_user->id), false);
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:31,代码来源:RESTAPI4Test.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     global $mod_strings, $app_strings, $theme;
     $theme = SugarTestThemeUtilities::createAnonymousTheme();
     $mod_strings = return_module_language($GLOBALS['current_language'], 'Connectors');
     $app_strings = return_application_language($GLOBALS['current_language']);
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:7,代码来源:ConnectorsAdminViewTest.php

示例4: setUp

 public function setUp()
 {
     $this->markTestIncomplete("Disabling after discussing with Eddy.  Eddy will take a look at why this is breaking Stack 66 build");
     //create user
     $this->user = SugarTestUserUtilities::createAnonymousUser();
     $this->user->default_team_name = 'global';
     $this->user->is_admin = 1;
     $this->user->save();
     $this->user->retrieve($this->user->id);
     $GLOBALS['current_user'] = $this->user;
     //set some global values that will help with the view
     $_REQUEST['action'] = $GLOBALS['action'] = 'DetailView';
     $_REQUEST['module'] = $GLOBALS['module'] = 'Opportunities';
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], "Opportunities");
     //create opportunity
     $name = 'Test_51980_' . time();
     $this->opp = new Opportunity();
     $this->opp->name = $name;
     $this->opp->amount = '1000000';
     $this->opp->account_id = '1';
     $this->opp->team_id = '1';
     $this->opp->currency_id = -99;
     $this->opp->save();
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:25,代码来源:Bug51980Test.php

示例5: setUp

 public function setUp()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $acc = new Account();
     $this->form = new SearchFormMock($acc, "Accounts");
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:7,代码来源:FileLocatorTest.php

示例6: run

 /**
  * This method implements the run function of RunnableSchedulerJob and handles processing a SchedulersJob
  *
  * @param Mixed $data parameter passed in from the job_queue.data column when a SchedulerJob is run
  * @return bool true on success, false on error
  */
 public function run($data)
 {
     global $app_strings, $language;
     $app_strings = return_application_language($language);
     $admin = BeanFactory::getBean('Administration');
     $config = $admin->getConfigForModule('Forecasts', 'base');
     $timeperiodInterval = $config['timeperiod_interval'];
     $timeperiodLeafInterval = $config['timeperiod_leaf_interval'];
     $parentTimePeriod = TimePeriod::getLatest($timeperiodInterval);
     $latestTimePeriod = TimePeriod::getLatest($timeperiodLeafInterval);
     $currentTimePeriod = TimePeriod::getCurrentTimePeriod($timeperiodLeafInterval);
     if (empty($latestTimePeriod)) {
         $GLOBALS['log']->error(string_format($app_strings['ERR_TIMEPERIOD_TYPE_DOES_NOT_EXIST'], array($timeperiodLeafInterval)) . '[latest]');
         return false;
     } else {
         if (empty($currentTimePeriod)) {
             $GLOBALS['log']->error(string_format($app_strings['ERR_TIMEPERIOD_TYPE_DOES_NOT_EXIST'], array($timeperiodLeafInterval)) . ' [current]');
             return false;
         } else {
             if (empty($parentTimePeriod)) {
                 $GLOBALS['log']->error(string_format($app_strings['ERR_TIMEPERIOD_TYPE_DOES_NOT_EXIST'], array($timeperiodLeafInterval)) . ' [parent]');
                 return false;
             }
         }
     }
     $timedate = TimeDate::getInstance();
     //We run the rebuild command if the latest TimePeriod is less than the specified configuration interval
     //from the current TimePeriod
     $correctStartDate = $timedate->fromDbDate($currentTimePeriod->start_date);
     $latestStartDate = $timedate->fromDbDate($latestTimePeriod->start_date);
     $shownForward = $config['timeperiod_shown_forward'];
     //Move the current start date forward by the leaf period amounts
     for ($x = 0; $x < $shownForward; $x++) {
         $correctStartDate->modify($parentTimePeriod->next_date_modifier);
     }
     $leafCycle = $latestTimePeriod->leaf_cycle;
     //If the current start data that was modified according to the shown forward period is past the latest
     //leaf period we need to build more timeperiods
     while ($correctStartDate > $latestStartDate) {
         //We need to keep creating leaf periods until we are in sync.
         //If the leaf period we need to create is the start of the leaf cycle
         //then we should also create the parent TimePeriod record.
         $startDate = $latestStartDate->modify($latestTimePeriod->next_date_modifier);
         $leafCycle = $leafCycle == $parentTimePeriod->leaf_periods ? 1 : $leafCycle + 1;
         if ($leafCycle == 1) {
             $parentTimePeriod = TimePeriod::getByType($timeperiodInterval);
             $parentTimePeriod->setStartDate($startDate->asDbDate());
             $parentTimePeriod->name = $parentTimePeriod->getTimePeriodName($leafCycle);
             $parentTimePeriod->save();
         }
         $leafTimePeriod = TimePeriod::getByType($timeperiodLeafInterval);
         $leafTimePeriod->setStartDate($startDate->asDbDate());
         $leafTimePeriod->name = $leafTimePeriod->getTimePeriodName($leafCycle, $parentTimePeriod);
         $leafTimePeriod->leaf_cycle = $leafCycle;
         $leafTimePeriod->parent_id = $parentTimePeriod->id;
         $leafTimePeriod->save();
     }
     $this->job->succeedJob();
     return true;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:66,代码来源:SugarJobCreateNextTimePeriod.php

示例7: createAppStringsCache

    function createAppStringsCache($lang = 'en_us')
    {
        global $sugar_config;
        $lst_mod = array('Accounts', 'Contacts', 'Opportunities', 'Leads', 'Calls', 'Meetings', 'Cases', 'Project', 'ProjectTask', 'Tasks', 'Notes');
        $required_list = $this->getListOfLists($lst_mod);
        // List of application list strings used in the application (enums)
        $app_strings = return_application_language($lang);
        $all_app_list_strings = return_app_list_strings_language($lang);
        $app_list_strings = array();
        foreach ($lst_mod as $key => $lst) {
            $app_list_strings["moduleList"][$lst] = $all_app_list_strings["moduleList"][$lst];
            $app_list_strings["moduleListSingular"][$lst] = isset($all_app_list_strings["moduleListSingular"][$lst]) ? $all_app_list_strings["moduleListSingular"][$lst] : $all_app_list_strings["moduleList"][$lst];
        }
        $app_list_strings["parent_type_display"] = $all_app_list_strings["parent_type_display"];
        $app_list_strings["duration_intervals"] = $all_app_list_strings["duration_intervals"];
        $app_list_strings["duration_dom"] = $all_app_list_strings["duration_dom"];
        $app_list_strings["moduleList"]["SavedSearches"] = $all_app_list_strings["moduleList"]["SavedSearch"];
        // date_range_search_dom in not defined until 6.2
        $app_list_strings["date_search"] = isset($all_app_list_strings["date_range_search_dom"]) ? $all_app_list_strings["date_range_search_dom"] : $all_app_list_strings["kbdocument_date_filter_options"];
        $app_list_strings["date_search"]['today'] = $app_strings['LBL_TODAY'];
        if (isset($all_app_list_strings["numeric_range_search_dom"])) {
            $app_list_strings["num_search"] = $all_app_list_strings["numeric_range_search_dom"];
        }
        foreach ($required_list as $lst) {
            $app_list_strings[$lst] = $all_app_list_strings[$lst];
        }
        $json = getJSONobj();
        $app_list_strings_encoded = str_replace('\\\\', "\\/", preg_replace("/'/", "&#039;", $json->encode($app_list_strings)));
        $SS_mod_strings = return_module_language($lang, "SavedSearch");
        $ADM_mod_strings = return_module_language($lang, "Administration");
        $str = <<<EOQ
var RES_CREATE='{$app_strings['LBL_CREATE_BUTTON_LABEL']}',RES_LIST='{$app_strings['LBL_LIST']}',RES_ADD_TO_HOME='{$app_strings['LBL_MARK_AS_FAVORITES']}',RES_REM_FROM_HOME='{$app_strings['LBL_REMOVE_FROM_FAVORITES']}',RES_RECORD_ERROR='{$app_strings['ERROR_NO_RECORD']}',RES_LAST_VIEWED='{$app_strings['LBL_LAST_VIEWED']}', RES_DELETE_CONFIRMATION='{$app_strings['NTC_DELETE_CONFIRMATION']}', RES_DEL_LABEL='{$app_strings['LBL_DELETE_BUTTON_LABEL']}', RES_NEXT_LABEL='{$app_strings['LNK_LIST_NEXT']}', RES_PREVIOUS_LABEL='{$app_strings['LNK_LIST_PREVIOUS']}',
 RES_ASC='{$SS_mod_strings["LBL_ASCENDING"]}',RES_DESC='{$SS_mod_strings["LBL_DESCENDING"]}',RES_HOME_LABEL='{$all_app_list_strings["moduleList"]["Home"]}',RES_SYNC='{$all_app_list_strings["moduleList"]["Sync"]}',RES_SAVEDSEARCH='{$all_app_list_strings["moduleList"]["SavedSearch"]}',RES_SAVESEARCH='{$SS_mod_strings["LBL_SAVE_SEARCH_AS"]}',RES_DISABLED='{$ADM_mod_strings["LBL_DISABLED"]}',
 sugar_app_list_strings = {$app_list_strings_encoded};
EOQ;
        $SS_mod_strings = null;
        $ADM_mod_strings = null;
        $all_app_list_strings = null;
        $app_array = array('LBL_CREATE_BUTTON_LABEL', 'LBL_EDIT_BUTTON', 'LBL_LIST', 'LBL_SEARCH_BUTTON_LABEL', 'LBL_CURRENT_USER_FILTER', 'LBL_BACK', 'LBL_SAVE_BUTTON_LABEL', 'LBL_CANCEL_BUTTON_LABEL', 'LBL_MARK_AS_FAVORITES', 'LBL_REMOVE_FROM_FAVORITES', 'NTC_DELETE_CONFIRMATION', 'LBL_DELETE_BUTTON_LABEL', 'ERROR_NO_RECORD', 'LBL_LAST_VIEWED', 'LNK_LIST_NEXT', 'LNK_LIST_PREVIOUS', 'LBL_LINK_SELECT', 'LBL_LIST_USER_NAME', 'NTC_LOGIN_MESSAGE', 'ERR_INVALID_EMAIL_ADDRESS', 'LBL_ASSIGNED_TO', 'LBL_CLEAR_BUTTON_LABEL', 'LBL_DURATION_DAYS', 'LBL_CLOSE_AND_CREATE_BUTTON_TITLE', 'LBL_CLOSE_AND_CREATE_BUTTON_LABEL', 'LBL_CLOSE_BUTTON_TITLE', 'LBL_CLOSE_BUTTON_LABEL', 'LBL_LISTVIEW_ALL', 'LBL_LISTVIEW_NONE', 'LBL_SAVED', 'LBL_PRIMARY_ADDRESS', 'LBL_BILLING_ADDRESS', 'LBL_ALT_ADDRESS', 'LBL_SHIPPING_ADDRESS', 'LBL_DUPLICATE_BUTTON', 'MSG_SHOW_DUPLICATES', 'LBL_EMAIL_OPT_OUT', 'MSG_LIST_VIEW_NO_RESULTS_BASIC', 'LBL_CITY');
        $str_app_array = array();
        foreach ($app_array as $key) {
            $str_app_array[$key] = str_replace('"', '\\"', isset($app_strings[$key]) ? $app_strings[$key] : $key);
        }
        $app_strings_encoded = $json->encode($str_app_array);
        $str .= "var sugar_app_strings = {$app_strings_encoded};";
        require_once 'modules/Administration/Administration.php';
        $administration = new Administration();
        $administration->saveSetting('QuickCRM', $lang, base64_encode($str));
        $in_file = strlen($str) > 49000 ? '1' : '0';
        $administration->saveSetting('QuickCRM', $lang . 'f', $in_file);
        //		if ($sugar_config['sugar_version']<'6.3'){
        $saveDir = realpath(dirname(__FILE__) . '/../../../mobile/fielddefs/');
        if ($fh = @fopen($saveDir . '/' . $lang . '.js', "w")) {
            fputs($fh, $str);
            fclose($fh);
        } else {
            // die();
        }
        //		}
    }
开发者ID:edsonmichaque,项目名称:QuickCRM-Basic,代码行数:60,代码来源:genJSfromSugar.php

示例8: initAppGlobals

 static function initAppGlobals()
 {
     global $current_language, $app_strings, $app_list_strings, $app_currency_strings;
     $app_currency_strings = return_app_currency_strings_language($current_language);
     $app_strings = return_application_language($current_language);
     $app_list_strings = return_app_list_strings_language($current_language);
 }
开发者ID:kduqi,项目名称:corebos,代码行数:7,代码来源:Utils.php

示例9: setUp

 /**
  * Create test user
  *
  */
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v3/soap.php';
     parent::setUp();
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     self::$helperObject = new APIv3Helper();
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:12,代码来源:SOAPAPI3Test.php

示例10: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['current_user']->is_admin = "1";
     $GLOBALS['current_language'] = "en_us";
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Administration');
     mkdir_recursive("cache/ExtTest");
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:9,代码来源:ExtTest.php

示例11: initGlobals

 /**
  * Initialize globals
  */
 protected function initGlobals()
 {
     global $current_language, $app_list_strings, $app_strings, $sugar_config;
     if (empty($current_language)) {
         $current_language = $sugar_config['default_language'];
     }
     $app_list_strings = return_app_list_strings_language($current_language);
     $app_strings = return_application_language($current_language);
 }
开发者ID:mmarum-sugarcrm,项目名称:cli-tools,代码行数:12,代码来源:CronCommand.php

示例12: setUp

 public function setUp()
 {
     global $current_user;
     $this->beans = array();
     $this->old_user = $current_user;
     $current_user = $this->_user = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:9,代码来源:JSAlertsTest.php

示例13: setUp

 public function setUp()
 {
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     //Reload langauge strings
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:10,代码来源:RestTestCase.php

示例14: setUp

 public function setUp()
 {
     $this->current_user = new User();
     $this->focus = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_list_strings'] = return_application_language($GLOBALS['current_language']);
     global $sugar_config;
     $sugar_config['default_user_name'] = $this->focus->user_name;
     global $app_list_strings;
     $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:Bug36615Test.php

示例15: setUp

 public function setUp()
 {
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->task = SugarTestTaskUtilities::createTask();
     $this->task->contact_id = $this->contact->id;
     $this->task->save();
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:10,代码来源:Bug45709Test.php


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