Static Public Member Functions

Modules Class Reference

List of all members.

Static Public Member Functions

static __static ()
static get_all ()
static get_active ()
static set_active ($modules)
static register ($name)
static unregister ($name)
static add ($module_name)
static remove ($module_id)
static remove_by_name ($module_name)
static storage_name ($module_id, $option)
static set_option ($module_id, $option, $value)
static get_option ($module_id, $option)
static commit ()
static commit_active ()
static setup_status_module ()
static filter_dash_module_status ($module, $id, $theme)

Detailed Description

Habari Modules Class

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

Definition at line 12 of file modules.php.


Member Function Documentation

static Modules::__static (  )  [static]

static initializer to setup base vars.

Definition at line 21 of file modules.php.

static Modules::add ( module_name  )  [static]

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

Parameters:
string $module_name the name of the module to add
Returns:
string A unique module id.

Definition at line 100 of file modules.php.

Referenced by CoreDashModules::action_plugin_activation(), AdminDashboardHandler::ajax_dashboard(), and AdminDashboardHandler::dash_additem().

static Modules::commit (  )  [static]

function commit Saves the available modules list to the options table

Definition at line 192 of file modules.php.

Referenced by register(), and unregister().

static Modules::commit_active (  )  [static]

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

Definition at line 201 of file modules.php.

Referenced by __static(), add(), remove(), remove_by_name(), set_active(), and unregister().

static Modules::filter_dash_module_status ( module,
id,
theme 
) [static]

Provide the content for the System Status dashboard module

Parameters:
array $module the module data
string $id the id of the module
Theme $theme an associated theme for outputting a template
Returns:
array An array of module data

Definition at line 236 of file modules.php.

static Modules::get_active (  )  [static]

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

Returns:
array Array of modules

Definition at line 52 of file modules.php.

Referenced by AdminDashboardHandler::fetch_dashboard_modules().

static Modules::get_all (  )  [static]

function get_all returns a list of all available modules

Returns:
array an array of module names

Definition at line 41 of file modules.php.

Referenced by AdminDashboardHandler::fetch_dashboard_modules(), and AdminDashboardHandler::filter_dash_module_add_item().

static Modules::get_option ( module_id,
option 
) [static]

function get_option Gets a module option

Parameters:
string $module_id
string $option
Returns:
mixed The option value

Definition at line 182 of file modules.php.

Referenced by CoreDashModules::filter_dash_module_latest_log_activity().

static Modules::register ( name  )  [static]

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

Parameters:
string $name module name

Definition at line 73 of file modules.php.

Referenced by setup_status_module().

static Modules::remove ( module_id  )  [static]

function remove Removes a module from the user's dashboard

Parameters:
string $module_id The ID of the module to remove

Definition at line 126 of file modules.php.

Referenced by AdminDashboardHandler::ajax_dashboard().

static Modules::remove_by_name ( module_name  )  [static]

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

Parameters:
string $module_name

Definition at line 137 of file modules.php.

Referenced by CoreDashModules::action_plugin_deactivation(), and unregister().

static Modules::set_active ( modules  )  [static]

function set_active Saves the list of active modules to the userinfo table

Parameters:
array An associative array of module names with the moduleIDs at keys.

Definition at line 62 of file modules.php.

Referenced by AdminDashboardHandler::ajax_dashboard().

static Modules::set_option ( module_id,
option,
value 
) [static]

function set_option Sets a module option

Parameters:
string $module_id
string $option
mixed $value

Definition at line 167 of file modules.php.

static Modules::setup_status_module (  )  [static]

Retrieve any system status info, if available

Definition at line 211 of file modules.php.

Referenced by __static().

static Modules::storage_name ( module_id,
option 
) [static]

function storage_name ( $module_id, $option ) Gets the storage name for a module option

Parameters:
string $module_id the module id
string $option the option name
Returns:
string storage name for the module option

Definition at line 154 of file modules.php.

Referenced by get_option(), and set_option().

static Modules::unregister ( name  )  [static]

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

Parameters:
string $name module name

Definition at line 85 of file modules.php.


The documentation for this class was generated from the following file: