themeList() public static method

Returns a list of available themes.
public static themeList ( ) : array
return array Keys are theme names, values are theme descriptions.
Exemplo n.º 1
0
$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']);