Documentation

Horde_Core_Prefs_Ui
in package

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.

Tags
author

Chuck Hagenbuch chuck@horde.org

author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2001-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

Properties

$app  : string
Current application.
$group  : string
Current preferences group.
$nobuttons  : bool
If set, suppresses display of the buttons.
$prefGroups  : array<string|int, mixed>
Preferences groups.
$prefs  : array<string|int, mixed>
Preferences.
$suppress  : array<string|int, mixed>
Suppressed preference entries.
$suppressGroups  : array<string|int, mixed>
Suppressed prefGroup entries.
$vars  : Horde_Variables
Form variables for this page load.
$_errors  : array<string|int, mixed>
List of update errors.

Methods

__construct()  : mixed
Constructor.
generateUI()  : mixed
Generate the UI for the preferences interface, either for a specific group, or the group selection interface.
getChangeablePrefs()  : array<string|int, mixed>
Returns the list of changeable prefs for a group.
getDefaultApp()  : string
Get the default application to show preferences for. Defaults to 'horde'.
groupIsEditable()  : bool
Determine whether or not a preferences group is editable.
handleForm()  : mixed
Handle a preferences form submission if there is one, updating any preferences which have been changed.
hasAdvancedPrefs()  : bool
Returns whether advanced preferences exist in the current application.
selfUrl()  : Horde_Url
Returns a self URL to the current page.
_addHordeIdentitiesPrefs()  : array<string|int, mixed>
Adds Horde base identities prefs to preference list.
_generateEntry()  : array<string|int, mixed>
Generates an entry hash for an identity's preference value.
_getPrefGroups()  : array<string|int, mixed>
Get the list of viewable preference groups, filtering out suppressed groups and groups with no settable prefs.
_handleForm()  : mixed
_identitiesUpdate()  : mixed
Update identities prefs.
_identityHeader()  : string
Output the identities page header entries (default identity, identity selection, and identity deletion).
_loadPrefs()  : mixed
Parses/loads preferences configuration.

Properties

$app

Current application.

public string $app

$group

Current preferences group.

public string $group

$nobuttons

If set, suppresses display of the buttons.

public bool $nobuttons = \false

$prefGroups

Preferences groups.

public array<string|int, mixed> $prefGroups = array()

$prefs

Preferences.

public array<string|int, mixed> $prefs = array()

$suppress

Suppressed preference entries.

public array<string|int, mixed> $suppress = array()

$suppressGroups

Suppressed prefGroup entries.

public array<string|int, mixed> $suppressGroups = array()

$vars

Form variables for this page load.

public Horde_Variables $vars

$_errors

List of update errors.

protected array<string|int, mixed> $_errors = array()

Methods

__construct()

Constructor.

public __construct(Horde_Variables $vars) : mixed
Parameters
$vars : Horde_Variables

Form variables.

generateUI()

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

public generateUI() : mixed
Tags
throws
Horde_Exception

getChangeablePrefs()

Returns the list of changeable prefs for a group.

public getChangeablePrefs([string $group = null ]) : array<string|int, mixed>
Parameters
$group : string = null

The preferences group to check.

Return values
array<string|int, mixed>

The list of changeable prefs.

getDefaultApp()

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

public getDefaultApp() : string
Return values
string

The default application.

groupIsEditable()

Determine whether or not a preferences group is editable.

public groupIsEditable(string $group) : bool
Parameters
$group : string

The preferences group to check.

Return values
bool

Whether or not the group is editable.

handleForm()

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

public handleForm() : mixed

hasAdvancedPrefs()

Returns whether advanced preferences exist in the current application.

public hasAdvancedPrefs() : bool
Return values
bool

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

selfUrl()

Returns a self URL to the current page.

public selfUrl([array<string|int, mixed> $options = array() ]) : Horde_Url
Parameters
$options : array<string|int, mixed> = array()

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.
Return values
Horde_Url

The URL object.

_addHordeIdentitiesPrefs()

Adds Horde base identities prefs to preference list.

protected _addHordeIdentitiesPrefs(array<string|int, mixed> $pref_list) : array<string|int, mixed>
Parameters
$pref_list : array<string|int, mixed>

Preference list.

Return values
array<string|int, mixed>

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

_generateEntry()

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

protected _generateEntry(string $member, mixed $val) : array<string|int, mixed>
Parameters
$member : string

A preference name.

$val : mixed

A preference value.

Return values
array<string|int, mixed>

An array with preference name, type, and value.

_getPrefGroups()

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

protected _getPrefGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>

The filtered prefGroups array.

_handleForm()

protected _handleForm(mixed $preflist, mixed $save) : mixed
Parameters
$preflist : mixed
$save : mixed

_identitiesUpdate()

Update identities prefs.

protected _identitiesUpdate() : mixed

_identityHeader()

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

protected _identityHeader(array<string|int, mixed> $members) : string
Parameters
$members : array<string|int, mixed>

The list of prefs to display on this page.

Return values
string

HTML output.

_loadPrefs()

Parses/loads preferences configuration.

protected _loadPrefs(string $app[, bool $data = false ]) : mixed
Parameters
$app : string

The application.

$data : bool = false

Return the data instead of loading into the current object?


        
On this page

Search results