Procedural File: modules.inc
Source Location: /lib/modules.inc
  
 
 
Classes:
accountContainer
	This class includes all modules and attributes of an account.
 
  
Page Details:
Interface between modules and other parts of LAM.
 
 
  
Tags:
  
Includes:
  
  
 
   
	
	buildUploadAccounts [line 396]
	
    
    
		mixed buildUploadAccounts(
string $scope, array $data, array $ids)
     |   
     |  
 
		This function builds the LDAP accounts for the file upload. If there are problems status messages will be printed automatically. 
Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type | 
       
		      
        | array   | 
        $data   | 
        array containing one account in each element | 
       
		      
        | array   | 
        $ids   | 
        array(<column_name> => <column number>) | 
       
				 
    	
	 
   
	
	checkConfigOptions [line 319]
	
    
    
		array checkConfigOptions(
array $scopes, array $options)
     |   
     |  
 
		Checks if the configuration options are valid
 Tags:
    
	
    		Parameters
    
		      
        | array   | 
        $scopes   | 
        hash array (module name => array(account types)) | 
       
		      
        | array   | 
        $options   | 
        hash array containing all options (name => array(...)) | 
       
				 
    	
	 
   
	
	checkProfileOptions [line 285]
	
    
    
		array checkProfileOptions(
string $scope, array $options)
     |   
     |  
 
		Checks if the profile options are valid
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type (user, group, host) | 
       
		      
        | array   | 
        $options   | 
        hash array containing all options (name => array(...)) | 
       
				 
    	
	 
   
	
	check_module_conflicts [line 229]
	
    
    
		boolean check_module_conflicts(
array $selected, array $deps)
     |   
     |  
 
		Checks if there are conflicts between modules
 Tags:
    
	
    		Parameters
    
		      
        | array   | 
        $selected   | 
        selected module names | 
       
		      
        | array   | 
        $deps   | 
        module dependencies | 
       
				 
    	
	 
   
	
	check_module_depends [line 188]
	
    
    
		mixed check_module_depends(
array $selected, array $deps)
     |   
     |  
 
		Checks if there are missing dependencies between modules.
 Tags:
    
	
    		Parameters
    
		      
        | array   | 
        $selected   | 
        selected module names | 
       
		      
        | array   | 
        $deps   | 
        module dependencies | 
       
				 
    	
	 
   
	
	doUploadPostActions [line 476]
	
    
    
		array doUploadPostActions(
string $scope, array $data, array $ids, array $failed)
     |   
     |  
 
		This function executes one post upload action.
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type | 
       
		      
        | array   | 
        $data   | 
        array containing one account in each element | 
       
		      
        | array   | 
        $ids   | 
        array(<column_name> => <column number>) | 
       
		      
        | array   | 
        $failed   | 
        list of accounts which were not created successfully | 
       
				 
    	
	 
   
	
	getAvailableModules [line 248]
	
    
    
		array getAvailableModules(
string $scope)
     |   
     |  
 
		Returns an array with all available user module names
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type (user, group, host) | 
       
				 
    	
	 
   
	
	getAvailablePDFFields [line 350]
	
    
    
		array getAvailablePDFFields(
string $scope)
     |   
     |  
 
		Returns a list of available PDF entries.
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type (user, group, host) | 
       
				 
    	
	 
   
	
	getConfigOptions [line 302]
	
    
    
		array getConfigOptions(
array $scopes)
     |   
     |  
 
		Returns a hash array (module name => elements) of all module options for the configuration page.
 Tags:
    
	
    		Parameters
    
		      
        | array   | 
        $scopes   | 
        hash array (module name => array(account types)) | 
       
				 
    	
	 
   
	
	getHelp [line 339]
	
    
    
		array getHelp(
string $module, string $helpID, [ $scope = ''])
     |   
     |  
 
		Returns a help entry from an account module.
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $helpID   | 
        help identifier | 
       
		      
        | string   | 
        $module   | 
        module name | 
       
		      
        |    | 
        $scope   | 
         | 
       
				 
    	
	 
   
	
	getModuleAlias [line 65]
	
    
    
		string getModuleAlias(
string $name, string $scope)
     |   
     |  
 
		Returns the alias name of a module
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $name   | 
        the module name | 
       
		      
        | string   | 
        $scope   | 
        the account type ("user", "group", "host") | 
       
				 
    	
	 
   
	
	getModulesDependencies [line 170]
	
    
    
		array getModulesDependencies(
string $scope)
     |   
     |  
 
		Returns a hash array (module name => dependencies) of all module dependencies "dependencies" contains an array with two sub arrays: depends, conflicts   The elements of "depends" are either module names or an array of module names (OR-case).   The elements of conflicts are module names. 
Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        the account type (user, group, host) | 
       
				 
    	
	 
   
	
	getProfileOptions [line 268]
	
    
    
		array getProfileOptions(
string $scope)
     |   
     |  
 
		Returns the elements for the profile page.
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type (user, group, host) | 
       
				 
    	
	 
   
	
	getRDNAttributes [line 120]
	
    
    
		array getRDNAttributes(
string $scope)
     |   
     |  
 
		Returns a list of LDAP attributes which can be used to form the RDN. The list is already sorted by the priority given by the nodules. 
Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type (user, group, host) | 
       
				 
    	
	 
   
	
	getRequiredExtensions [line 512]
	
    
    
		array getRequiredExtensions(
)
     |   
     |  
 
		Returns true if the module is a base module
 Tags:
    
	
    	
	 
   
	
	getUploadColumns [line 376]
	
    
    
		array getUploadColumns(
string $scope)
     |   
     |  
 
		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: <module name>_<column name>)     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    ) 
Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        account type | 
       
				 
    	
	 
   
	
	get_ldap_filter [line 88]
	
    
    
		string get_ldap_filter(
string $scope)
     |   
     |  
 
		Returns the LDAP filter used by the account lists
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $scope   | 
        the account type ("user", "group", "host") | 
       
				 
    	
	 
   
	
	is_base_module [line 77]
	
    
    
		boolean is_base_module(
string $name, string $scope)
     |   
     |  
 
		Returns true if the module is a base module
 Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $name   | 
        the module name | 
       
		      
        | string   | 
        $scope   | 
        the account type ("user", "group", "host") | 
       
				 
    	
	 
   
	
	parseHtml [line 674]
	
    
    
		array parseHtml(
string $module, array $input, array $values, boolean $restricted,  &$tabindex,  &$tabindexLink, string $scope, integer $tabindex, integer $tabindexLink)
     |   
     |  
 
		Takes a list of meta-HTML elements and prints the equivalent HTML output. The modules are not allowed to display HTML code directly but return  meta HTML code. This allows to have a common design for all module pages.      Meta HTML code is always returned as a three dimensional array[a][b][c]  where a is the row number, b is the column number and c is  is a data element.      Format of data elements:      A data element is an array which contains the data to display.   All data elements must contail a value "kind" which  defines what kind of element should be displayed.      These are the possibilies for kind and what other options have to be added to the array:       - fieldset: Inserts a fieldset.
 
- legend: The legend of the fieldset.
 - value: A data element. Can be used recursively.
 
  - help: Adds a help link.
 
- value: The help number for the help entry.
 - scope: The account type for the help entry.
  
  - input: Adds a HTML input element.
 
- name: The name of the element, will be used later as variable name
                    when user input is returned.
 - type: allowed values: submit, reset, checkbox, text, password, file, hidden
 - checked: Boolean value, if true a checkbox will be checked. This
                       value is only needed or checkboxes.
 - disabled: Boolean value, if true the element will be disabled.
 - size: The length of the input element, only used for text, password and file.
 - maxlength: The maximum size of the input element, only used for
                          text, password and file.
 - value: The element will have this value as default. Button elements will have
                     this as caption.
 
  - select: This will add a select field.
 
- name: The name of the element, will be used later as variable name when user input is
                    returned.
 - multiple: Boolean value, if set to true the user can select more than one entry.
 - options: Array of string. This is the list of option values the user can select.
 - options_selected: Array of string. This is the list of pre selected elements, must contain
                                values that are also in options.
 - descriptiveOptions:
 Boolean value, if set to true then all elements in options must be arrays themselves (array(value,
description)) (default: false)
  - size: The size of the select field, if set to 1 a dropdown box will be displayed.
 - noSorting: If set to true then the entries will not be sorted. Default is false.
 - onchange: onchange event
  
  - table: Adds a table. Can be used recursively.
  
- value: A data element. Can be used recursively.
 
  - text: Inserts a text element.
  
- text: The text to display.
 
  - textarea: Adds a multiline text field.
  
- name: The name of the element, will be used later as variable name when user
                    input is returned.
 - rows: Number of rows (required)
  - cols: Number of characters for each line (required)
  - readonly: Boolean value, if true the text field will be read only.
  
  - image: Displays an image.
 
- path: Path to the image
 - width: Width of the image
 - height: Height of the image
 - alt: Alt text of the image
  
       Beneath those values a  "td" value may be added. This has to be an array with one or more  of these options:     - colspan: Like the HTML colspan attribute for td elements
 - rowspan: Like the HTML rowspan attribute for td elements
 - align: left/center/right/justify Like the HTML align attribute
 - valign: top/middle/bottom Like the HTML valign attribute
 - width: Like the HTML height attribute for td elements
      Input buttons which should load a different subpage of a module must have a special  name attribute:     name => 'form_subpage_' .  <module name> . '_' .  <subpage name> . '_' .  <button name>  - <module name>: name of this account module (e.g. 'posixAccount')
 - <subpage name>: name of next subpage (e.g. 'attributes')
 - <button name>: a name to distinguish buttons (e.g. 'ok'/'cancel'/'back')
        Example:   array(  
  array(  
    array("kind" => "text", "text" => "This is an example", "td" => array("colspan" => 3))  
  ),  
  array(  
    array("kind" => "text", "text" => "Input:"),  
    array("kind" => "input", "name" => "myinput", "type" => "text"),  
    array("kind" => "help", "value" => "42")  
  ),  
  array(  
    array("kind" =>  "input", "name" =>  'form_subpage_myModule_attributes_back', "value" =>  _("Back"))  
  )  
)  
 
Tags:
    
	
    		Parameters
    
		      
        | string   | 
        $module   | 
        Name of account module | 
       
		      
        | array   | 
        $input   | 
        List of meta-HTML elements | 
       
		      
        | array   | 
        $values   | 
        List of values which override the defaults in $input (name => value) | 
       
		      
        | boolean   | 
        $restricted   | 
        If true then no buttons will be displayed | 
       
		      
        | integer   | 
        $tabindex   | 
        Start value of tabulator index for input fields | 
       
		      
        | integer   | 
        $tabindexLink   | 
        Start value of tabulator index for links | 
       
		      
        | string   | 
        $scope   | 
        Account type | 
       
		      
        |    | 
        &$tabindex   | 
         | 
       
		      
        |    | 
        &$tabindexLink   | 
         | 
       
				 
    	
	 
        
       |   
     |