Class Modules

Description

Habari Modules Class

Provides an interface for the code to access modules and module options

Located in /system/classes/modules.php (line 9)


	
			
Method Summary
static string add (string $module_name)
static void commit ()
static void commit_active ()
static array filter_dash_module_status (array $module, string $id, Theme $theme)
static array get_active ()
static array get_all ()
static mixed get_option (string $module_id, string $option)
static void register (string $name)
static void remove (string $module_id)
static void remove_by_name (string $module_name)
static void setup_status_module ()
static void set_active (array $modules)
static void set_option (string $module_id, string $option, mixed $value)
static string storage_name (string $module_id, string $option)
static void unregister (string $name)
static void __static ()
Methods
static method add (line 97)

function add

Adds a module to the user's dashboard. Generate a unique module ID

  • return: A unique module id.
  • access: public
static string add (string $module_name)
  • string $module_name: the name of the module to add
static method commit (line 189)

function commit

Saves the available modules list to the options table

  • access: public
static void commit ()
static method commit_active (line 198)

function commit_active Saves the active modules list to the userinfo table.

  • access: public
static void commit_active ()
static method filter_dash_module_status (line 233)

Provide the content for the System Status dashboard module

  • return: An array of module data
  • access: public
static array filter_dash_module_status (array $module, string $id, Theme $theme)
  • array $module: the module data
  • string $id: the id of the module
  • Theme $theme: an associated theme for outputting a template
static method get_active (line 49)

function get_active

Returns a list of modules currently active on the dashboard, sorted by display order

  • return: Array of modules
  • access: public
static array get_active ()
static method get_all (line 38)

function get_all

returns a list of all available modules

  • return: an array of module names
  • access: public
static array get_all ()
static method get_option (line 179)

function get_option

Gets a module option

  • return: The option value
  • access: public
static mixed get_option (string $module_id, string $option)
  • string $module_id
  • string $option
static method register (line 70)

function register

Registers a module to make it available in the 'add item' module

  • access: public
static void register (string $name)
  • string $name: module name
static method remove (line 123)

function remove

Removes a module from the user's dashboard

  • access: public
static void remove (string $module_id)
  • string $module_id: The ID of the module to remove
static method remove_by_name (line 134)

function remove_by_name

Removes all modules with a given name from the user's dashboard

  • access: public
static void remove_by_name (string $module_name)
  • string $module_name
static method setup_status_module (line 208)

Retrieve any system status info, if available

  • access: public
static void setup_status_module ()
static method set_active (line 59)

function set_active

Saves the list of active modules to the userinfo table

  • access: public
static void set_active (array $modules)
  • array $modules: An associative array of module names with the moduleIDs at keys.
static method set_option (line 164)

function set_option

Sets a module option

  • access: public
static void set_option (string $module_id, string $option, mixed $value)
  • string $module_id
  • string $option
  • mixed $value
static method storage_name (line 151)

function storage_name ( $module_id, $option )

Gets the storage name for a module option

  • return: storage name for the module option
  • access: public
static string storage_name (string $module_id, string $option)
  • string $module_id: the module id
  • string $option: the option name
static method unregister (line 82)

function unregister

Unregisters a module to remove it from the 'add item' module list

  • access: public
static void unregister (string $name)
  • string $name: module name
static method __static (line 18)

static initializer to setup base vars.

  • access: public
static void __static ()

Documentation generated on Thu, 30 Oct 2008 20:31:21 +0100 by phpDocumentor 1.3.2