PHP Class Horde_Core_Prefs_Ui, horde

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.
Author: Chuck Hagenbuch ([email protected])
Author: Michael Slusarz ([email protected])
ファイルを表示 Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$app string Current application.
$group string Current preferences group.
$nobuttons boolean If set, suppresses display of the buttons.
$prefGroups array Preferences groups.
$prefs array Preferences.
$suppress array Suppressed preference entries.
$suppressGroups array Suppressed prefGroup entries.
$vars Horde_Variables Form variables for this page load.

Protected Properties

Property Type Description
$_errors array List of update errors.

Public Methods

Method Description
__construct ( Horde_Variables $vars ) Constructor.
generateUI ( ) Generate the UI for the preferences interface, either for a specific group, or the group selection interface.
getChangeablePrefs ( string $group = null ) : array Returns the list of changeable prefs for a group.
getDefaultApp ( ) : string Get the default application to show preferences for. Defaults to 'horde'.
groupIsEditable ( string $group ) : boolean Determine whether or not a preferences group is editable.
handleForm ( ) Handle a preferences form submission if there is one, updating any preferences which have been changed.
hasAdvancedPrefs ( ) : boolean Returns whether advanced preferences exist in the current application.
selfUrl ( array $options = [] ) : Horde_Url Returns a self URL to the current page.

Protected Methods

Method Description
_addHordeIdentitiesPrefs ( array $pref_list ) : array Adds Horde base identities prefs to preference list.
_generateEntry ( string $member, mixed $val ) : array Generates an entry hash for an identity's preference value.
_getPrefGroups ( ) : array Get the list of viewable preference groups, filtering out suppressed groups and groups with no settable prefs.
_handleForm ( $preflist, $save ) * Handle a preferences form submission if there is one, updating any preferences which have been changed.
_identitiesUpdate ( ) Update identities prefs.
_identityHeader ( array $members ) : string Output the identities page header entries (default identity, identity selection, and identity deletion).
_loadPrefs ( string $app, boolean $data = false ) Parses/loads preferences configuration.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Variables $vars )
$vars Horde_Variables Form variables.

_addHordeIdentitiesPrefs() protected method

Adds Horde base identities prefs to preference list.
protected _addHordeIdentitiesPrefs ( array $pref_list ) : array
$pref_list array Preference list.
return array The preference list with the Horde preferences added, if needed. These prefs are also added to $this->prefs.

_generateEntry() protected method

Generates an entry hash for an identity's preference value.
protected _generateEntry ( string $member, mixed $val ) : array
$member string A preference name.
$val mixed A preference value.
return array An array with preference name, type, and value.

_getPrefGroups() protected method

Get the list of viewable preference groups, filtering out suppressed groups and groups with no settable prefs.
protected _getPrefGroups ( ) : array
return array The filtered prefGroups array.

_handleForm() protected method

* Handle a preferences form submission if there is one, updating any preferences which have been changed.
protected _handleForm ( $preflist, $save )
$preflist The list of preferences to process.
$save The object to save preferences values to.

_identitiesUpdate() protected method

Update identities prefs.
protected _identitiesUpdate ( )

_identityHeader() protected method

Output the identities page header entries (default identity, identity selection, and identity deletion).
protected _identityHeader ( array $members ) : string
$members array The list of prefs to display on this page.
return string HTML output.

_loadPrefs() protected method

Parses/loads preferences configuration.
protected _loadPrefs ( string $app, boolean $data = false )
$app string The application.
$data boolean Return the data instead of loading into the current object?

generateUI() public method

Generate the UI for the preferences interface, either for a specific group, or the group selection interface.
public generateUI ( )

getChangeablePrefs() public method

Returns the list of changeable prefs for a group.
public getChangeablePrefs ( string $group = null ) : array
$group string The preferences group to check.
return array The list of changeable prefs.

getDefaultApp() public method

Get the default application to show preferences for. Defaults to 'horde'.
public getDefaultApp ( ) : string
return string The default application.

groupIsEditable() public method

Determine whether or not a preferences group is editable.
public groupIsEditable ( string $group ) : boolean
$group string The preferences group to check.
return boolean Whether or not the group is editable.

handleForm() public method

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

hasAdvancedPrefs() public method

Returns whether advanced preferences exist in the current application.
public hasAdvancedPrefs ( ) : boolean
return boolean True if at least one of the preferences is an advanced preference.

selfUrl() public method

Returns a self URL to the current page.
public selfUrl ( array $options = [] ) : Horde_Url
$options 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 Horde_Url The URL object.

Property Details

$_errors protected_oe property

List of update errors.
protected array $_errors
return array

$app public_oe property

Current application.
public string $app
return string

$group public_oe property

Current preferences group.
public string $group
return string

$nobuttons public_oe property

If set, suppresses display of the buttons.
public bool $nobuttons
return boolean

$prefGroups public_oe property

Preferences groups.
public array $prefGroups
return array

$prefs public_oe property

Preferences.
public array $prefs
return array

$suppress public_oe property

Suppressed preference entries.
public array $suppress
return array

$suppressGroups public_oe property

Suppressed prefGroup entries.
public array $suppressGroups
return array

$vars public_oe property

Form variables for this page load.
public Horde_Variables $vars
return Horde_Variables