A singleton utility class to allow for working with modules.
| since | 0.9 |
|---|---|
| package |
CMS |
| license |
GPL |
get_instance() : \ModuleOperations
set_module_classname(string $module, string $classname)
.. useful when the module class file itself is within a namespace.
string $moduleThe module name
string $classnameThe class name.
generate_moduleinfo(\CMSModule $modinstance) : string
InstallModule(string $module) : array
string $moduleThe name of the module to install
array
Returns a tuple of whether the install was successful and a message if applicable
FindAllModules() : array
array
of module names
GetInstalledModuleInfo() : array
array
IsModuleActive(string $module_name) : boolean
string $module_name boolean
ActivateModule(string $module_name, boolean $activate = true) : boolean
string $module_nameboolean $activateflag indicating wether to activate or deactivate the module
boolean
GetLoadedModules() : array
array
The hash of all loaded modules
GetAllModuleNames() : array
array
GetAllModuleInfo() : array
array
GetInstalledModules(boolean $include_all = FALSE) : array
boolean $include_allInclude even inactive modules
array
get_modules_with_capability(string $capability, mixed $args = null) : array
string $capabilityThe capability name
mixed $argsCapability arguments
array
List of all the module objects with that capability
get_module_dependencies(string $module_name) : array
this method works by reading the dependencies from the database.
string $module_nameThe module name
array
Hash of module names and dependencies
get_module_instance(string $module_name, string $version = '', boolean $force = FALSE) : \CMSModule
string $module_nameThe module name
string $versionan optional version string.
boolean $forcean optional flag to indicate wether the module should be force loaded if necesary.
IsSystemModule(string $module_name) : boolean
string $module_nameThe module name
boolean
RegisterAdminAuthenticationModule(\CMSModule $mod)
This method can only be called once per request.
\CMSModule $modThe new authentication module. It must implement the CMSMS\IAuthModuleInterface.
GetAdminLoginModule() : \CMSModule|null
GetSyntaxHighlighter(string $module_name = null) : \CMSModule
This method retrieves the specified syntax highlighter module, or uses the current current user preference for the syntax hightlighter module for a name.
string $module_nameallows bypassing the automatic detection process and specifying a wysiwyg module.
GetWYSIWYGModule(string $module_name = null) : \CMSModule
This method makes an attempt to find the appropriate wysiwyg module given the current request context and admin user preference.
string $module_nameallows bypassing the automatic detection process and specifying a wysiwyg module.
GetSearchModule() : \CMSModule
GetFilePickerModule() : \CMSMS\FilePickerInterface
This method returns module object for the currently selected search module.
GetSyntaxModule(string $module_name = null) : \CMSModule