本文整理汇总了PHP中SugarThemeRegistry::getDefault方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarThemeRegistry::getDefault方法的具体用法?PHP SugarThemeRegistry::getDefault怎么用?PHP SugarThemeRegistry::getDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarThemeRegistry
的用法示例。
在下文中一共展示了SugarThemeRegistry::getDefault方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetDefaultThemeObjectWhenDefaultThemeIsNotSet
/**
* @ticket 41635
*/
public function testGetDefaultThemeObjectWhenDefaultThemeIsNotSet()
{
unset($GLOBALS['sugar_config']['default_theme']);
$themename = array_pop(array_keys(SugarThemeRegistry::availableThemes()));
$object = SugarThemeRegistry::getDefault();
$this->assertInstanceOf('SugarTheme', $object);
$this->assertEquals($object->__toString(), $themename);
}
示例2: action_saveuserwizard
protected function action_saveuserwizard()
{
global $current_user, $sugar_config;
// set all of these default parameters since the Users save action will undo the defaults otherwise
$_POST['record'] = $current_user->id;
$_POST['is_admin'] = $current_user->is_admin ? 'on' : '';
$_POST['use_real_names'] = true;
$_POST['should_remind'] = '1';
$_POST['reminder_time'] = 1800;
$_POST['mailmerge_on'] = 'on';
$_POST['user_theme'] = (string) SugarThemeRegistry::getDefault();
// save and redirect to new view
$_REQUEST['return_module'] = 'Home';
$_REQUEST['return_action'] = 'index';
require 'modules/Users/Save.php';
}
示例3: testLoadDisplaySettingsUserTheme
public function testLoadDisplaySettingsUserTheme()
{
$this->_loadUser();
$_REQUEST['usertheme'] = (string) SugarThemeRegistry::getDefault();
$this->_app->loadDisplaySettings();
$this->assertEquals($GLOBALS['theme'], $_REQUEST['usertheme']);
$this->_removeUser();
}
示例4: installLog
//$_POST[''] = $_REQUEST['setup_site_session_path'];
//$_POST[''] = $_REQUEST['setup_site_log_dir'];
//$_POST[''] = $_REQUEST['setup_site_guid'];
//$_POST[''] = $_REQUEST['default_email_charset'];
//$_POST[''] = $_REQUEST['default_export_charset'];
//$_POST[''] = $_REQUEST['export_delimiter'];
$_POST['record'] = $current_user->id;
$_POST['is_admin'] = $current_user->is_admin ? 'on' : '';
$_POST['use_real_names'] = true;
$_POST['reminder_checked'] = '1';
$_POST['reminder_time'] = 1800;
$_POST['email_reminder_time'] = 3600;
$_POST['mailmerge_on'] = 'on';
$_POST['receive_notifications'] = $current_user->receive_notifications;
installLog('DBG: SugarThemeRegistry::getDefault');
$_POST['user_theme'] = (string) SugarThemeRegistry::getDefault();
// save and redirect to new view
$_REQUEST['return_module'] = 'Home';
$_REQUEST['return_action'] = 'index';
installLog('DBG: require modules/Users/Save.php');
require 'modules/Users/Save.php';
// restore superglobals and vars
$GLOBALS = $varStack['GLOBALS'];
foreach ($varStack['defined_vars'] as $__key => $__value) {
${$__key} = $__value;
}
$endTime = microtime(true);
$deltaTime = $endTime - $startTime;
if (count($bottle) > 0) {
foreach ($bottle as $bottle_message) {
$bottleMsg .= "{$bottle_message}\n";