Documentation

Horde_Core_Perms_Ui
in package

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.

Tags
author

Chuck Hagenbuch chuck@horde.org

category

Horde

Table of Contents

Properties

$_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.

Methods

__construct()  : mixed
Constructor.
renderForm()  : mixed
Renders the edit form.
renderTree()  : string
Return a Horde_Tree representation of the permissions tree.
setForm()  : mixed
Set an existing form object to use for the edit form.
setupAddForm()  : mixed
Create a form to add a permission.
setupDeleteForm()  : mixed
Create a permission deleting form.
setupEditForm()  : mixed
Create a permission editing form.
setVars()  : mixed
Set an existing vars object to use for the edit form.
validateAddForm()  : mixed
Function to validate any add form input.
validateDeleteForm()  : mixed
Function to validate any delete form input.
validateEditForm()  : mixed
Function to validate any edit form input.
_formInit()  : mixed
Creates any form objects if they have not been initialised yet.

Properties

$_corePerms

The Horde_Core_Perms object we're displaying UI stuff for.

protected Horde_Core_Perms $_corePerms

$_form

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

protected Horde_Form $_form = \null

$_perms

The Horde_Perms object we're displaying UI stuff for.

protected Horde_Perms_Base $_perms

$_type

The permission type.

protected string $_type = 'matrix'

$_vars

The Horde_Variables object used in Horde_Form.

protected Horde_Variables $_vars = \null

Methods

__construct()

Constructor.

public __construct(Horde_Perms_Base $perms, Horde_Core_Perms_Base $corePerms) : mixed
Parameters
$perms : Horde_Perms_Base

The object to display UI stuff for.

$corePerms : Horde_Core_Perms_Base

renderForm()

Renders the edit form.

public renderForm([mixed $form_script = 'edit.php' ]) : mixed
Parameters
$form_script : mixed = 'edit.php'

renderTree()

Return a Horde_Tree representation of the permissions tree.

public renderTree([mixed $current = Horde_Perms::ROOT ]) : string
Parameters
$current : mixed = Horde_Perms::ROOT
Tags
throws
Horde_Perms_Exception
Return values
string

The html showing the permissions as a Horde_Tree.

setForm()

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

public setForm(Horde_Form &$form) : mixed
Parameters
$form : Horde_Form

An existing Horde_Form object to use.

setupAddForm()

Create a form to add a permission.

public setupAddForm(Horde_Perms_Permission $permission[, string $force_choice = null ]) : mixed
Parameters
$permission : Horde_Perms_Permission

Permission

$force_choice : string = null

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

setupDeleteForm()

Create a permission deleting form.

public setupDeleteForm(Horde_Perms_Permission $permission) : mixed
Parameters
$permission : Horde_Perms_Permission

A permissions object.

setupEditForm()

Create a permission editing form.

public setupEditForm(Horde_Perms_Permission $permission) : mixed
Parameters
$permission : Horde_Perms_Permission

TODO

setVars()

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

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

An existing Horde_Variables object to use.

validateAddForm()

Function to validate any add form input.

public validateAddForm(array<string|int, mixed> &$info) : mixed
Parameters
$info : array<string|int, mixed>

Ref to hold info from the form

Return values
mixed

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

validateDeleteForm()

Function to validate any delete form input.

public validateDeleteForm(TODO &$info) : mixed
Parameters
$info : TODO

TODO

Return values
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()

Function to validate any edit form input.

public validateEditForm(mixed &$info) : mixed
Parameters
$info : mixed
Return values
mixed

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

_formInit()

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

protected _formInit() : mixed

        
On this page

Search results