當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Horde_Themes::themeList方法代碼示例

本文整理匯總了PHP中Horde_Themes::themeList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Horde_Themes::themeList方法的具體用法?PHP Horde_Themes::themeList怎麽用?PHP Horde_Themes::themeList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Horde_Themes的用法示例。


在下文中一共展示了Horde_Themes::themeList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

$prefGroups['display'] = array('column' => _("Other Information"), 'label' => _("Display Preferences"), 'desc' => _("Set your startup application, color scheme, page refreshing, and other display preferences."), 'members' => array('initial_application', 'show_last_login', 'theme', 'summary_refresh_time', 'sidebar_width', 'menu_refresh_time', 'widget_accesskey'));
$_prefs['initial_application'] = array('value' => 'horde', 'type' => 'enum', 'enum' => array(), 'desc' => sprintf(_("What application should %s display after login?"), $GLOBALS['registry']->get('name')), 'on_init' => function ($ui) {
    $enum = array();
    $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
    foreach ($GLOBALS['registry']->listApps(array('active')) as $a) {
        if (file_exists($GLOBALS['registry']->get('fileroot', $a)) && ($perms->exists($a) && ($perms->hasPermission($a, $GLOBALS['registry']->getAuth(), Horde_Perms::READ) || $GLOBALS['registry']->isAdmin()) || !$perms->exists($a))) {
            $enum[$a] = $GLOBALS['registry']->get('name', $a);
        }
    }
    asort($enum);
    $ui->prefs['initial_application']['enum'] = $enum;
});
$_prefs['show_last_login'] = array('value' => true, 'advanced' => true, 'type' => 'checkbox', 'desc' => _("Show last login time when logging in?"));
// Last login time of user
$_prefs['last_login'] = array('value' => 'a:0:{}');
$_prefs['theme'] = array('value' => 'default', 'type' => 'enum', 'enum' => Horde_Themes::themeList(), 'desc' => _("Select your color scheme."));
$_prefs['summary_refresh_time'] = array('value' => 300, 'type' => 'enum', 'enum' => array(0 => _("Never"), 30 => _("Every 30 seconds"), 60 => _("Every minute"), 300 => _("Every 5 minutes"), 900 => _("Every 15 minutes"), 1800 => _("Every half hour")), 'desc' => _("Refresh Portal View:"));
$_prefs['sidebar_width'] = array('value' => 210, 'type' => 'number', 'desc' => sprintf(_("Width of the %s menu on the left:"), $GLOBALS['registry']->get('name', 'horde')));
$_prefs['menu_refresh_time'] = array('value' => 300, 'type' => 'enum', 'enum' => array(0 => _("Never"), 30 => _("Every 30 seconds"), 60 => _("Every minute"), 120 => _("Every 2 minutes"), 300 => _("Every 5 minutes")), 'desc' => _("Refresh Dynamic Menu Elements:"));
$_prefs['widget_accesskey'] = array('value' => true, 'advanced' => true, 'type' => 'checkbox', 'desc' => _("Should access keys be defined for most links?"));
// The layout of the portal page.
$_prefs['portal_layout'] = array('value' => 'a:0:{}');
// *** Facebook Integration Preferences ***
$prefGroups['facebook'] = array('column' => _("Other Information"), 'label' => _("Facebook Integration"), 'desc' => _("Set up integration with your Facebook account."), 'members' => array('facebookmanagement'), 'suppress' => function () {
    return empty($GLOBALS['conf']['facebook']['enabled']) || empty($GLOBALS['conf']['facebook']['id']) || empty($GLOBALS['conf']['facebook']['secret']);
});
$_prefs['facebookmanagement'] = array('type' => 'special', 'handler' => 'Horde_Prefs_Special_Facebook');
$_prefs['facebook'] = array('value' => 'a:0:{}');
// *** Twitter Intergration Preferences ***
$prefGroups['twitter'] = array('column' => _("Other Information"), 'label' => _("Twitter Integration"), 'desc' => _("Set up integration with your Twitter account."), 'members' => array('twittermanagement'), 'suppress' => function () {
    return empty($GLOBALS['conf']['twitter']['enabled']) || empty($GLOBALS['conf']['twitter']['key']) || empty($GLOBALS['conf']['twitter']['secret']);
開發者ID:jubinpatel,項目名稱:horde,代碼行數:31,代碼來源:prefs.php


注:本文中的Horde_Themes::themeList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。