PHP Class Horde_Core_Perms_Ui, horde

Copyright 2001-2016 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.
Author: Chuck Hagenbuch ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_corePerms Horde_Core_Perms The Horde_Core_Perms object we're displaying UI stuff for.
$_form Horde_Form The Horde_Form object that will be used for displaying the edit form.
$_perms Horde_Perms_Base The Horde_Perms object we're displaying UI stuff for.
$_type string The permission type.
$_vars Horde_Variables The Horde_Variables object used in Horde_Form.

Public Methods

Method Description
__construct ( Horde_Perms_Base $perms, Horde_Core_Perms $corePerms ) Constructor.
renderForm ( $form_script = 'edit.php' ) Renders the edit form.
renderTree ( $current = Horde_Perms::ROOT ) : string Return a Horde_Tree representation of the permissions tree.
setForm ( Horde_Form &$form ) Set an existing form object to use for the edit form.
setVars ( Horde_Variables $vars ) Set an existing vars object to use for the edit form.
setupAddForm ( Horde_Perms_Permission $permission, string $force_choice = null ) Create a form to add a permission.
setupDeleteForm ( Horde_Perms_Permission $permission ) Create a permission deleting form.
setupEditForm ( Horde_Perms_Permission $permission ) Create a permission editing form.
validateAddForm ( &$info ) : mixed Function to validate any add form input.
validateDeleteForm ( TODO &$info ) : mixed Function to validate any delete form input.
validateEditForm ( &$info ) : mixed Function to validate any edit form input.

Protected Methods

Method Description
_formInit ( ) Creates any form objects if they have not been initialised yet.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Perms_Base $perms, Horde_Core_Perms $corePerms )
$perms Horde_Perms_Base The object to display UI stuff for.
$corePerms Horde_Core_Perms

_formInit() protected method

Creates any form objects if they have not been initialised yet.
protected _formInit ( )

renderForm() public method

Renders the edit form.
public renderForm ( $form_script = 'edit.php' )

renderTree() public method

Return a Horde_Tree representation of the permissions tree.
public renderTree ( $current = Horde_Perms::ROOT ) : string
return string The html showing the permissions as a Horde_Tree.

setForm() public method

Set an existing form object to use for the edit form.
public setForm ( Horde_Form &$form )
$form Horde_Form An existing Horde_Form object to use.

setVars() public method

Set an existing vars object to use for the edit form.
public setVars ( Horde_Variables $vars )
$vars Horde_Variables An existing Horde_Variables object to use.

setupAddForm() public method

Create a form to add a permission.
public setupAddForm ( Horde_Perms_Permission $permission, string $force_choice = null )
$permission Horde_Perms_Permission Permission
$force_choice string If the permission to be added can be one of many, setting this will force the choice to one particular.

setupDeleteForm() public method

Create a permission deleting form.
public setupDeleteForm ( Horde_Perms_Permission $permission )
$permission Horde_Perms_Permission A permissions object.

setupEditForm() public method

Create a permission editing form.
public setupEditForm ( Horde_Perms_Permission $permission )
$permission Horde_Perms_Permission TODO

validateAddForm() public method

Function to validate any add form input.
public validateAddForm ( &$info ) : mixed
return mixed Either false if the form does not validate correctly or an array with all the form values.

validateDeleteForm() public method

Function to validate any delete form input.
public validateDeleteForm ( TODO &$info ) : mixed
$info TODO TODO
return 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.

validateEditForm() public method

Function to validate any edit form input.
public validateEditForm ( &$info ) : mixed
return mixed Either false if the form does not validate correctly or an array with all the form values.

Property Details

$_corePerms protected_oe property

The Horde_Core_Perms object we're displaying UI stuff for.
protected Horde_Core_Perms $_corePerms
return Horde_Core_Perms

$_form protected_oe property

The Horde_Form object that will be used for displaying the edit form.
protected Horde_Form $_form
return Horde_Form

$_perms protected_oe property

The Horde_Perms object we're displaying UI stuff for.
protected Horde_Perms_Base $_perms
return Horde_Perms_Base

$_type protected_oe property

The permission type.
protected string $_type
return string

$_vars protected_oe property

The Horde_Variables object used in Horde_Form.
protected Horde_Variables $_vars
return Horde_Variables