ModuleHelper
Module helper class
since |
1.5 |
---|
Methods
_load
Load published modules.
_load() : array
since |
1.5 |
---|---|
deprecated |
4.0 Use ModuleHelper::load() instead |
Response
array
cleanModuleList
Clean the module list
cleanModuleList(array $modules) : array
Arguments
- $modules
array
Array with module objects
Response
array
getLayoutPath
Get the path to a layout for a module
getLayoutPath(string $module, string $layout = 'default') : string
since |
1.5 |
---|
Arguments
- $module
string
The name of the module- $layout
string
The name of the module layout. If alternative layout, in the form template:filename.
Response
string
The path to the module layout
getModule
Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')
getModule(string $name, string $title = null) : \stdClass
since |
1.5 |
---|
Arguments
- $name
string
The name of the module- $title
string
The title of the module, optional
Response
\stdClass
The Module object
getModuleById
Get module by id
getModuleById(string $id) : \stdClass
since |
3.9.0 |
---|
Arguments
- $id
string
The id of the module
Response
\stdClass
The Module object
getModuleList
Module list
getModuleList() : array
Response
array
getModules
Get modules by position
getModules(string $position) : array
since |
1.5 |
---|
Arguments
- $position
string
The position of the module
Response
array
An array of module objects
isAdminMultilang
Method to determine if filtering by language is enabled in back-end for modules.
isAdminMultilang() : boolean
since |
3.8.0 |
---|
Response
boolean
True 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(string $module) : boolean
since |
1.5 |
---|
Arguments
- $module
string
The module name
Response
boolean
See description for conditions.
load
Load published modules.
load() : array
since |
3.2 |
---|
Response
array
moduleCache
Module cache helper
moduleCache(object $module, object $moduleparams, object $cacheparams) : string
Caching modes: To be set in XML: 'static' One cache file for all pages with the same module parameters 'oldstatic' 1.5 definition of module caching, one cache file for all pages with the same module id and user aid, '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 | \JFilterInput::clean() |
---|---|
since |
1.6 |
Arguments
- $module
object
Module object- $moduleparams
object
Module parameters- $cacheparams
object
Module cache parameters - id or URL parameters, depending on the module cache mode
Response
string
renderModule
Render the module.
renderModule(object $module, array $attribs = array()) : string
since |
1.5 |
---|
Arguments
- $module
object
A module object.- $attribs
array
An array of attributes for the module (probably from the XML).
Response
string
The HTML content of the module output.