lib/modules/quota.inc
Properties
Description
Manages quotas for users and groups.Classes
quota
Description
Manages quotas for users and groups.It implements the complete module interface and uses meta-data provided by the account modules for its functions.
Location and naming of modules
All LAM modules are placed in lib/modules/ and are named "
You can avoid to override many functions by using {@link get_metaData()}.
All module classes should extend the baseModule class.
Methods
check_profileOptions, display_html_attributes, doUploadPostActions, getCn, get_metaData, get_pdfEntries, get_profileOptions, get_uploadColumns, initQuotas, load_Messages, load_profile, module_ready, postModifyActions, preDeleteActions, process_attributes, replaceSpecialChars,check_profileOptions( array $options, ) : array
Description
Checks input values of account profiles.Arguments
Name | Type | Description | Default |
---|---|---|---|
$options | array | a hash array (name => value) containing the options |
Return value
Type | Description |
---|---|
array | list of error messages (array(type, title, text)) to generate StatusMessages, if any |
display_html_attributes( ) : \htmlElement
Description
Returns the HTML meta data for the main account page.Return value
Type | Description |
---|---|
\htmlElement | HTML meta data |
doUploadPostActions( array $data, array $ids, array $failed, array $temp, array $accounts, ) : array
Description
This function executes one post upload action.Arguments
Name | Type | Description | Default |
---|---|---|---|
$data | array | array containing one account in each element |
|
$ids | array | array( |
|
$failed | array | list of accounts which were not created successfully |
|
$temp | array | variable to store temporary data between two post actions |
|
$accounts | array | list of LDAP entries |
Return value
Type | Description |
---|---|
array | current status <br> array ( <br> 'status' => 'finished' | 'inProgress' <br> 'progress' => 0..100 <br> 'errors' => array (<array of parameters for StatusMessage>) <br> ) |
getCn( ) : String
Description
Gets the cn from the Unix group module.Return value
Type | Description |
---|---|
String | cn attribute |
get_metaData( ) : array
Description
Returns meta data that is interpreted by parent classReturn value
Type | Description |
---|---|
array | array with meta data |
Tags
Name | Description |
---|---|
see |
get_pdfEntries( ) : array
Description
Returns the PDF entries for this module.Return value
Type | Description |
---|---|
array | list of possible PDF entries |
get_profileOptions( ) : \htmlElement
Description
Returns a list of elements for the account profiles.Return value
Type | Description |
---|---|
\htmlElement | profile elements |
get_uploadColumns( array $selectedModules, ) : array
Description
Returns an array containing all input columns for the file upload.Syntax:
array(
string: name, // fixed non-translated name which is used as column name (should be of format:
string: description, // short descriptive name
string: help, // help ID
string: example, // example value
boolean: required // true, if user must set a value for this column
)
Arguments
Name | Type | Description | Default |
---|---|---|---|
$selectedModules | array | list of selected account modules |
Return value
Type | Description |
---|---|
array | column list |
load_Messages( ) : n/a
Description
this functin fills the error message array with messagesReturn value
Type | Description |
---|---|
n/a | n/a |
load_profile( array $profile, ) : n/a
Description
Loads the values of an account profile into internal variables.Arguments
Name | Type | Description | Default |
---|---|---|---|
$profile | array | hash array with profile values (identifier => value) |
Return value
Type | Description |
---|---|
n/a | n/a |
module_ready( ) : boolean
Description
This function is used to check if this module page can be displayed.It returns false if a module depends on data from other modules which was not yet entered.
Return value
Type | Description |
---|---|
boolean | true, if page can be displayed |
postModifyActions( boolean $newAccount, array $attributes, ) : array
Description
Quotas are set in postmodify.Arguments
Name | Type | Description | Default |
---|---|---|---|
$newAccount | boolean | is new account |
|
$attributes | array | LDAP attributes of this entry |
Return value
Type | Description |
---|---|
array | array which contains status messages. Each entry is an array containing the status message parameters. |
Tags
Name | Description |
---|---|
see |
preDeleteActions( ) : array
Description
Allows the module to run commands before the LDAP entry is deleted.Return value
Type | Description |
---|---|
array | Array which contains status messages. Each entry is an array containing the status message parameters. |