From 79334951a461e010a778dd561cc405d98e199a57 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 10 Aug 2005 16:14:12 +0000 Subject: [PATCH] added documentation about modules.inc --- lam/docs/devel/account_modules_lib.htm | 142 +++++++++++++++++++++++++ lam/docs/devel/index.htm | 3 +- 2 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 lam/docs/devel/account_modules_lib.htm diff --git a/lam/docs/devel/account_modules_lib.htm b/lam/docs/devel/account_modules_lib.htm new file mode 100644 index 00000000..6f4f2465 --- /dev/null +++ b/lam/docs/devel/account_modules_lib.htm @@ -0,0 +1,142 @@ + + + + + Account modules (modules.inc) + + + +

Account modules (modules.inc)
+

+
+Modules.inc provides the +interface to all module specific functions. It includes a list of +account independent function and the accountContainer +class. This class represents an LDAP account.
+You should never call module functions directly, always use a function +in modules.inc.
+
+

Account independent functions:

+
+

General functions:

+getModuleAlias: This returns +the alias name of a module. It is used label buttons or fieldsets.
+
+parseHtml: Converts the LAM +meta HTML code to real HTML code.
+
+
+

Functions for LAM configuration:

+is_base_module: When the given +module is a base module then +this returns true. Every +account type needs exactly one base +module.
+
+getModulesDependencies: Account +modules can specify dependencies to other modules. E.g. Samba accounts +always need a Unix part.
+
+check_module_depends/check_module_conflicts: +This function checks if all module dependencies are satisfied.
+
+getAvailableModules: Returns a +list of available modules. If you need a list of all active modules use +$_SESSION['config']->get_AccountModules().
+
+getConfigOptions: Returns a +list of all configuration options which were defined by the modules.
+
+getConfigDescriptions: Returns +a list of all configuration descriptions and titles for the fieldsets.
+
+checkConfigOptions: Checks if +the user filled in valid values for each option.
+
+
+

Account list functions:

+get_ldap_filter: Each account +list shows only entries which match a given LDAP search filter.
+
+
+

Profile/account pages:

+getRDNAttributes: This returns +a list of possible LDAP RDN +attributes. LAM needs this to build the DN for new accounts.
+
+getProfileOptions: Returns a +list of all profile options which were defined by the account modules.
+
+checkProfileOptions: Checks if +all module options are correct.
+
+
+

Help functions:

+getHelp: Returns a module help +entry.
+
+
+

PDF functions:

+getAvailablePDFFields: Returns +a list of possible PDF fields.
+
+
+

Upload functions:

+getUploadColumns: Returns a +list of possible upload columns and additional information like a +description, help entry and example value.
+
+buildUploadAccounts: Takes the +input of the CSV file and builds the LDAP accounts.
+
+doUploadPostActions: Manages +the execution of actions which need to be done after the accounts are +created.
+
+
+

Class accountContainer:

+This class represents a complete LDAP account. It manages all functions +which concern a specific LDAP entry.
+
+

Important variables:

+There are some class variables which can be of important use in the +account modules.
+
+module: List of account modules +(array('name' => 'object')).
+
+isNewAccount: This variable is true when the account is newly +created, false if loaded from +LDAP.
+
+

Function list:

+continue_main: This function is +called when an account page is displayed. It generates the HTML code +for the account pages.
+
+get_module_attributes: Returns +all attributes of a given object class.
+
+save_module_attributes: Finds +differences between current and original account.
+
+load_account: Loads an LDAP +account.
+
+new_account: Creates a new +account.
+
+save_account: Saves an account +to LDAP.
+
+get_pdfEntries: Returns the PDF +values of an account.
+
+
+
+ + diff --git a/lam/docs/devel/index.htm b/lam/docs/devel/index.htm index a05a557a..dcdfd5ad 100644 --- a/lam/docs/devel/index.htm +++ b/lam/docs/devel/index.htm @@ -44,7 +44,8 @@ lists

Libraries: