lib/modules/quota.inc

Properties

Description

Manages quotas for users and groups.

Classes

quota

Properties

 
 
modules  
No 
No 

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 ".inc". E.g. if you create a new module and its class name is "qmail" then the filename would be "qmail.inc". The class name of a module must contain only a-z, A-Z, 0-9, -, and _.

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 class

Return 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

initQuotas( ) : n/a

Description

Initializes the quota values.

Return value

Type Description
n/a n/a

load_Messages( ) : n/a

Description

this functin fills the error message array with messages

Return 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.

process_attributes( ) : array

Description

Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

Return value

Type Description
array list of info/error messages

replaceSpecialChars( string   $input, ) : string

Description

Replaces special characters in HTML name values.

Arguments

Name Type Description Default
$input string

input string

Return value

Type Description
string output string

Properties

$QUOTA_PREFIX, $SPLIT_DELIMITER, $quota,

  private  static $QUOTA_PREFIX = 'QUOTA_ENTRY '

prefix for lamdaemon results


  private  static $SPLIT_DELIMITER = "###x##y##x###"

delimiter for lamdaemon commands


  private  $quota =

Saves the quota settings


Documentation was generated by phpDocumentor 2.0.1 .

Namespaces

  • global

    Packages