class JModuleHelper


Located at : UKNOWVA_ROOT/libraries/joomla/application/module/helper.php

Module helper class

Methods

static object
getModule(string $name, string $title = null)

Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')

static array
getModules(string $position)

Get modules by position

static boolean
isEnabled(string $module)

Checks if a module is enabled

static string
renderModule(object $module, array $attribs = array())

Render the module.

static string
getLayoutPath(string $module, string $layout = 'default')

Get the path to a layout for a module

static string
moduleCache($module, $moduleparams, $cacheparams)

Module cache helper

Details

at line 34
static object getModule(string $name, string $title = null)

Get module by name (real, eg 'Breadcrumbs' or folder, eg 'mod_breadcrumbs')

Parameters

string $name The name of the module
string $title The title of the module, optional

Return Value

object The Module object

at line 79
static array getModules(string $position)

Get modules by position

Parameters

string $position The position of the module

Return Value

array An array of module objects

at line 116
static boolean isEnabled(string $module)

Checks if a module is enabled

Parameters

string $module The module name

Return Value

boolean

at line 133
static string renderModule(object $module, array $attribs = array())

Render the module.

Parameters

object $module A module object.
array $attribs An array of attributes for the module (probably from the XML).

Return Value

string The HTML content of the module output.

at line 240
static string getLayoutPath(string $module, string $layout = 'default')

Get the path to a layout for a module

Parameters

string $module The name of the module
string $layout The name of the module layout. If alternative layout, in the form template:filename.

Return Value

string The path to the module layout

at line 402
static string moduleCache($module, $moduleparams, $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

Parameters

$module
$moduleparams
$cacheparams

Return Value

string