ModuleHelper
Module helper class
| since |
1.5 |
|---|---|
| package |
Joomla CMS |
Methods
cleanModuleList
Clean the module list
cleanModuleList(mixed||string|int modules) : mixed||string|int
Arguments
- modules
array<string|int, mixed>Array with module objects
Response
array<string|int, mixed>
createDummyModule
Method to create a dummy module.
createDummyModule() : \stdClass
| since |
4.0.0 |
|---|
Response
stdClassThe Module object
getLayoutPath
Get the path to a layout for a module
getLayoutPath( module, layout = 'default') :
| since |
1.5 |
|---|
Arguments
- module
stringThe name of the module- layout
stringThe name of the module layout. If alternative layout, in the form template:filename.
Response
stringThe path to the module layout
getModule
Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')
getModule( name, title = null) : \stdClass|null
| since |
1.5 |
|---|
Arguments
- name
stringThe name of the module- title
stringThe title of the module, optional
Response
stdClass|nullThe Module object
getModuleById
Get module by id
getModuleById( id) : \stdClass
| since |
3.9.0 |
|---|
Arguments
- id
stringThe id of the module
Response
stdClassThe Module object
getModuleList
Module list
getModuleList() : mixed||string|int
Response
array<string|int, mixed>
getModules
Get modules by position
getModules( position) : mixed||string|int
| since |
1.5 |
|---|
Arguments
- position
stringThe position of the module
Response
array<string|int, mixed>An array of module objects
isAdminMultilang
Method to determine if filtering by language is enabled in back-end for modules.
isAdminMultilang() :
| since |
3.8.0 |
|---|
Response
boolTrue if enabled; false otherwise.
isEnabled
Checks if a module is enabled. A given module will only be returned if it meets the following criteria: it is enabled, it is assigned to the current menu item or all items, and the user meets the access level requirements.
isEnabled( module) :
| since |
1.5 |
|---|
Arguments
- module
stringThe module name
Response
boolSee description for conditions.
load
Load published modules.
load() : mixed||string|int
| since |
3.2 |
|---|
Response
array<string|int, mixed>
moduleCache
Module cache helper
moduleCache( module, moduleparams, cacheparams) :
Caching modes: To be set in XML: 'static' One cache file for all pages with the same module parameters 'itemid' Changes on itemid change, to be called from inside the module: 'safeuri' Id created from $cacheparams->modeparams array, 'id' Module sets own cache id's
| see | InputFilter::clean() |
|---|---|
| since |
1.6 |
Arguments
- module
objectModule object- moduleparams
objectModule parameters- cacheparams
objectModule cache parameters - id or URL parameters, depending on the module cache mode
Response
string
renderModule
Render the module.
renderModule( module, mixed||string|int attribs = []) :
| since |
1.5 |
|---|
Arguments
- module
objectA module object.- attribs
array<string|int, mixed>An array of attributes for the module (probably from the XML).
Response
stringThe HTML content of the module output.
renderRawModule
Render the module content.
renderRawModule( module, \Joomla\Registry\Registry params, mixed||string|int attribs = []) :
| since |
4.0.0 |
|---|
Arguments
- module
objectA module object- params
RegistryA module parameters- attribs
array<string|int, mixed>An array of attributes for the module (probably from the XML).
Response
string