\Horde_Core_Prefs_Ui

Class for generating/processing the preferences UI.

See Horde_Registry_Application for a summary of the API callbacks that are available.

Session variables set (stored in 'horde_prefs'): 'advanced' - (boolean) If true, display advanced prefs.

Summary

Methods
Properties
Constants
__construct()
groupIsEditable()
getChangeablePrefs()
hasAdvancedPrefs()
handleForm()
selfUrl()
generateUI()
getDefaultApp()
$prefGroups
$prefs
$suppress
$suppressGroups
$app
$group
$vars
$nobuttons
No constants found
_handleForm()
_loadPrefs()
_getPrefGroups()
_addHordeIdentitiesPrefs()
_identityHeader()
_generateEntry()
_identitiesUpdate()
$_errors
N/A
No private methods found
No private properties found
N/A

Properties

$prefGroups

$prefGroups : array

Preferences groups.

Type

array

$prefs

$prefs : array

Preferences.

Type

array

$suppress

$suppress : array

Suppressed preference entries.

Type

array

$suppressGroups

$suppressGroups : array

Suppressed prefGroup entries.

Type

array

$app

$app : string

Current application.

Type

string

$group

$group : string

Current preferences group.

Type

string

$vars

$vars : \Horde_Variables

Form variables for this page load.

Type

\Horde_Variables

$nobuttons

$nobuttons : boolean

If set, suppresses display of the buttons.

Type

boolean

$_errors

$_errors : array

List of update errors.

Type

array

Methods

__construct()

__construct(\Horde_Variables  $vars) 

Constructor.

Parameters

\Horde_Variables $vars

Form variables.

groupIsEditable()

groupIsEditable(string  $group) : boolean

Determine whether or not a preferences group is editable.

Parameters

string $group

The preferences group to check.

Returns

boolean —

Whether or not the group is editable.

getChangeablePrefs()

getChangeablePrefs(string  $group = null) : array

Returns the list of changeable prefs for a group.

Parameters

string $group

The preferences group to check.

Returns

array —

The list of changeable prefs.

hasAdvancedPrefs()

hasAdvancedPrefs() : boolean

Returns whether advanced preferences exist in the current application.

Returns

boolean —

True if at least one of the preferences is an advanced preference.

handleForm()

handleForm() 

Handle a preferences form submission if there is one, updating any preferences which have been changed.

selfUrl()

selfUrl(array  $options = array()) : \Horde_Url

Returns a self URL to the current page.

Parameters

array $options

Additional options:

'special' - (boolean) If set, will trigger special action update
            processing when the URL is loaded.
'token' - (boolean) If set, includes the form token in the URL.

Returns

\Horde_Url —

The URL object.

generateUI()

generateUI() 

Generate the UI for the preferences interface, either for a specific group, or the group selection interface.

Throws

\Horde_Exception

getDefaultApp()

getDefaultApp() : string

Get the default application to show preferences for. Defaults to 'horde'.

Returns

string —

The default application.

_handleForm()

_handleForm(  $preflist,   $save) 

Parameters

$preflist
$save

_loadPrefs()

_loadPrefs(string  $app, boolean  $data = false) 

Parses/loads preferences configuration.

Parameters

string $app

The application.

boolean $data

Return the data instead of loading into the current object?

_getPrefGroups()

_getPrefGroups() : array

Get the list of viewable preference groups, filtering out suppressed groups and groups with no settable prefs.

Returns

array —

The filtered prefGroups array.

_addHordeIdentitiesPrefs()

_addHordeIdentitiesPrefs(array  $pref_list) : array

Adds Horde base identities prefs to preference list.

Parameters

array $pref_list

Preference list.

Returns

array —

The preference list with the Horde preferences added, if needed. These prefs are also added to $this->prefs.

_identityHeader()

_identityHeader(array  $members) : string

Output the identities page header entries (default identity, identity selection, and identity deletion).

Parameters

array $members

The list of prefs to display on this page.

Returns

string —

HTML output.

_generateEntry()

_generateEntry(string  $member, mixed  $val) : array

Generates an entry hash for an identity's preference value.

Parameters

string $member

A preference name.

mixed $val

A preference value.

Returns

array —

An array with preference name, type, and value.

_identitiesUpdate()

_identitiesUpdate() 

Update identities prefs.