ModuleHelper
class ModuleHelper
Module helper class
Methods
Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')
Get modules by position
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.
Render the module.
Get the path to a layout for a module
Module list
Clean the module list
Module cache helper
Method to determine if filtering by language is enabled in back-end for modules.
Get module by id
Details
static
stdClass
getModule(
string $name,
string $title = null)
Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')
static
boolean
isEnabled(
string $module)
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.
static
string
getLayoutPath(
string $module,
string $layout = 'default')
Get the path to a layout for a module
static
string
moduleCache(
object $module,
object $moduleparams,
object $cacheparams)
Module cache helper
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