Class mosModuleHandler

Description

Singleton class to handle with modules

This class loads, counts and caches modules for both sides, user and admin

Located in /includes/cmtclasses.php (line 585)


	
			
Method Summary
 void canAccess (object a $module, int $gid)
 array &getByName (string $name, [bool $isAdmin = false], [bool $unpublished = false])
 object reference &getInstance ()
 void mosCountModules ([string $position = 'left'], [bool $isAdmin = false])
 void mosLoadAdminModules ([string $position = 'left'], [int $style = 0])
 void mosLoadModules ([string $position = 'left'], [int $style = 0], [bool $isAdmin = false])
Methods
canAccess (line 815)

Module access check

Used in

void canAccess (object a $module, int $gid)
  • object a $module: module object
  • int $gid: an array of groups
getByName (line 695)

Returns a array with modules that match whit $name, when $unpublished is TRUE unpublished modules are returned too.

  • return: array with all modules that match
  • access: public
array &getByName (string $name, [bool $isAdmin = false], [bool $unpublished = false])
  • string $name: Name of module required
  • bool $isAdmin: TRUE when admin modules will loaded
  • bool $unpublished: TRUE whish to include unpublished modules too
getInstance (line 627)

Returns a reference to current handler

This function returns a reference to current modules handler, if none handler exists, it creates one.

  • return: to current singleton Handler
object reference &getInstance ()
mosCountModules (line 680)

Returns the number of modules in a specified position, this method is called by mosCountModules global function

  • access: public
void mosCountModules ([string $position = 'left'], [bool $isAdmin = false])
  • string $position: The template position
  • bool $isAdmin: TRUE when admin modules will loaded
mosLoadAdminModules (line 760)

Loads admin modules from a specified position,a $style can be passed to change the style of output

void mosLoadAdminModules ([string $position = 'left'], [int $style = 0])
  • string $position: The position
  • int $style: The style 0 = no style(default), 1 = tabbed, 2 = use div
mosLoadModules (line 713)

Loads all published modules from a specified position, a $style can be passed to change the style of output

void mosLoadModules ([string $position = 'left'], [int $style = 0], [bool $isAdmin = false])
  • string $position: The position
  • int $style: The style. 0=normal(default), 1=horiz, -1=no wrapper
  • bool $isAdmin: TRUE when admin modules will loaded

Documentation generated on Mon, 05 May 2008 16:17:59 +0400 by phpDocumentor 1.4.0