Class Horde_Core_Perms_Ui
The Horde_Core_Perms_Ui class provides UI methods for the Horde permissions
system.
Copyright 2001-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
|
#
__construct( Horde_Perms_Base $perms, Horde_Core_Perms $corePerms )
Constructor.
Parameters
- $perms
- The object to display UI stuff for.
- $corePerms
-
|
public
string
|
#
renderTree( mixed $current = Horde_Perms::ROOT )
Return a Horde_Tree representation of the permissions tree.
Return a Horde_Tree representation of the permissions tree.
Returns
string The html showing the permissions as a Horde_Tree.
Throws
Horde_Perms_Exception
|
public
|
#
setForm( Horde_Form & $form )
Set an existing form object to use for the edit form.
Set an existing form object to use for the edit form.
Parameters
- $form
- An existing Horde_Form object to use.
|
public
|
#
setVars( Horde_Variables $vars )
Set an existing vars object to use for the edit form.
Set an existing vars object to use for the edit form.
Parameters
- $vars
- <p>An existing Horde_Variables object to
use.</p>
|
public
|
#
setupAddForm( Horde_Perms_Permission $permission, string $force_choice = null )
Create a form to add a permission.
Create a form to add a permission.
Parameters
- $permission
- Permission
- $force_choice
- <p>If the permission to be
added can be one of many,
setting this will force the
choice to one particular.</p>
|
public
mixed
|
#
validateAddForm( array & $info )
Function to validate any add form input.
Function to validate any add form input.
Parameters
- $info
- $info Ref to hold info from the form
Returns
mixed Either false if the form does not validate correctly or
an array with all the form values.
|
public
|
#
setupEditForm( Horde_Perms_Permission $permission )
Create a permission editing form.
Create a permission editing form.
Parameters
|
public
mixed
|
#
validateEditForm( mixed & $info )
Function to validate any edit form input.
Function to validate any edit form input.
Returns
mixed Either false if the form does not validate correctly or
an array with all the form values.
|
public
|
#
setupDeleteForm( Horde_Perms_Permission $permission )
Create a permission deleting form.
Create a permission deleting form.
Parameters
- $permission
- A permissions object.
|
public
mixed
|
#
validateDeleteForm( TODO & $info )
Function to validate any delete form input.
Function to validate any delete form input.
Parameters
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.
|
public
|
|