CWIS Developer Documentation
Public Member Functions | List of all members
PrivilegeEditingUI Class Reference

User interface element for editing PrivilegeSets. More...

Public Member Functions

 __construct ($Schemas=NULL, $MetadataFields=array())
 Constructor for privilege editing UI. More...
 
 DisplaySet ($Identifier, PrivilegeSet $PrivilegeSet, $IsNested=FALSE)
 Display interface for editing specified privilege set. More...
 
 GetPrivilegeSetsFromForm ()
 Construct new privilege sets from available form ($_POST) data. More...
 
 GetPrivilegeSetFromForm ($Identifier)
 Retrieve privilege set from specified form ($_POST) data fields. More...
 

Detailed Description

User interface element for editing PrivilegeSets.

The enclosing form must have the class "priv-form".

Definition at line 14 of file PrivilegeEditingUI.php.

Constructor & Destructor Documentation

PrivilegeEditingUI::__construct (   $Schemas = NULL,
  $MetadataFields = array() 
)

Constructor for privilege editing UI.

Parameters
int$SchemasSchemaId or array of SchemaIds that will be used for any fields referenced in privilege conditions (OPTIONAL, defaults to all Schemas)
array$MetadataFieldsArray of metadata field objects (keyed by FieldId) listing fields that should be displayed. If this argument is specified, the $SchemaIds argument must be NULL.

Definition at line 26 of file PrivilegeEditingUI.php.

References MetadataSchema\GetAllSchemas(), MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TIMESTAMP, and MetadataSchema\MDFTYPE_USER.

Member Function Documentation

PrivilegeEditingUI::DisplaySet (   $Identifier,
PrivilegeSet  $PrivilegeSet,
  $IsNested = FALSE 
)

Display interface for editing specified privilege set.

Parameters
string$IdentifierAlphanumeric identifier for this privilege set.
object$PrivilegeSetCurrent values for privilege set.
bool$IsNestedFor recursion only - DO NOT USE.

Definition at line 111 of file PrivilegeEditingUI.php.

References PrivilegeSet\GetPrivilegeInfo(), MetadataSchema\MDFTYPE_OPTION, and PHP.

PrivilegeEditingUI::GetPrivilegeSetFromForm (   $Identifier)

Retrieve privilege set from specified form ($_POST) data fields.

Parameters
string$IdentifierIdentifier of privilege set to return.
Returns
object Privilege set or FALSE if no privilege set form data found with the specified identifier.

Definition at line 308 of file PrivilegeEditingUI.php.

References MetadataSchema\GetAllSchemas(), GetPrivilegeSetsFromForm(), MetadataSchema\MDFTYPE_DATE, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TIMESTAMP, MetadataSchema\MDFTYPE_USER, and PHP.

PrivilegeEditingUI::GetPrivilegeSetsFromForm ( )

Construct new privilege sets from available form ($_POST) data.

Returns
array Returns an array of PrivilegeSet objects.

Definition at line 255 of file PrivilegeEditingUI.php.

Referenced by GetPrivilegeSetFromForm().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: