\Horde_Core_Perms_Ui

The Horde_Core_Perms_Ui class provides UI methods for the Horde permissions system.

Copyright 2001-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
renderTree()
setForm()
setVars()
setupAddForm()
validateAddForm()
setupEditForm()
validateEditForm()
setupDeleteForm()
validateDeleteForm()
renderForm()
No public properties found
No constants found
_formInit()
$_perms
$_corePerms
$_form
$_vars
$_type
N/A
No private methods found
No private properties found
N/A

Properties

$_perms

$_perms : \Horde_Perms_Base

The Horde_Perms object we're displaying UI stuff for.

Type

\Horde_Perms_Base

$_corePerms

$_corePerms : \Horde_Core_Perms

The Horde_Core_Perms object we're displaying UI stuff for.

Type

\Horde_Core_Perms

$_form

$_form : \Horde_Form

The Horde_Form object that will be used for displaying the edit form.

Type

\Horde_Form

$_vars

$_vars : \Horde_Variables

The Horde_Variables object used in Horde_Form.

Type

\Horde_Variables

$_type

$_type : string

The permission type.

Type

string

Methods

__construct()

__construct(\Horde_Perms_Base  $perms, \Horde_Core_Perms_Base  $corePerms) 

Constructor.

Parameters

\Horde_Perms_Base $perms

The object to display UI stuff for.

\Horde_Core_Perms_Base $corePerms

renderTree()

renderTree(  $current = \Horde_Perms::ROOT) : string

Return a Horde_Tree representation of the permissions tree.

Parameters

$current

Throws

\Horde_Perms_Exception

Returns

string —

The html showing the permissions as a Horde_Tree.

setForm()

setForm(\Horde_Form  $form) 

Set an existing form object to use for the edit form.

Parameters

\Horde_Form $form

An existing Horde_Form object to use.

setVars()

setVars(\Horde_Variables  $vars) 

Set an existing vars object to use for the edit form.

Parameters

\Horde_Variables $vars

An existing Horde_Variables object to use.

setupAddForm()

setupAddForm(\Horde_Perms_Permission  $permission, string  $force_choice = null) 

Create a form to add a permission.

Parameters

\Horde_Perms_Permission $permission

Permission

string $force_choice

If the permission to be added can be one of many, setting this will force the choice to one particular.

validateAddForm()

validateAddForm(  $info) : mixed

Function to validate any add form input.

Parameters

$info

Returns

mixed —

Either false if the form does not validate correctly or an array with all the form values.

setupEditForm()

setupEditForm(\Horde_Perms_Permission  $permission) 

Create a permission editing form.

Parameters

\Horde_Perms_Permission $permission

TODO

validateEditForm()

validateEditForm(  $info) : mixed

Function to validate any edit form input.

Parameters

$info

Returns

mixed —

Either false if the form does not validate correctly or an array with all the form values.

setupDeleteForm()

setupDeleteForm(\Horde_Perms_Permission  $permission) 

Create a permission deleting form.

Parameters

\Horde_Perms_Permission $permission

A permissions object.

validateDeleteForm()

validateDeleteForm(\TODO  $info) : mixed

Function to validate any delete form input.

Parameters

\TODO $info

TODO

Returns

mixed —

If the delete button confirmation has been pressed return true, if any other submit button has been pressed return false. If form did not validate return null.

renderForm()

renderForm(  $form_script = 'edit.php') 

Renders the edit form.

Parameters

$form_script

_formInit()

_formInit() 

Creates any form objects if they have not been initialised yet.