Class JModuleHelper
Methods summary
public static
stdClass
&
|
#
getModule( string $name, string $title = null )
Get module by name (real, eg 'Breadcrumbs' or folder, eg
'mod_breadcrumbs')
Get module by name (real, eg 'Breadcrumbs' or folder, eg
'mod_breadcrumbs')
Parameters
- $name
string - $name The name of the module
- $title
string - $title The title of the module, optional
Returns
Since
1.5
|
public static
array
&
|
#
getModules( string $position )
Get modules by position
Parameters
- $position
string - $position The position of the module
Returns
array - An array of module objects
Since
1.5
|
public 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.
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.
Parameters
- $module
string - $module The module name
Returns
boolean - See description for conditions.
Since
1.5
|
public static
string
|
#
renderModule( object $module, array $attribs = array() )
Render the module.
Parameters
- $module
object - $module A module object.
- $attribs
array - $attribs An array of attributes for the module (probably from the XML).
Returns
string - The HTML content of the module output.
Since
1.5
|
public static
string
|
#
getLayoutPath( string $module, string $layout = 'default' )
Get the path to a layout for a module
Get the path to a layout for a module
Parameters
- $module
string - $module The name of the module
- $layout
string - $layout The name of the module layout. If alternative layout, in the form
template:filename.
Returns
string - The path to the module layout
Since
1.5
|
protected static
array
&
|
#
_load( )
Load published modules.
Deprecated
4.0 Use JModuleHelper::load() instead
Returns
array
Since
1.5
|
protected static
array
&
|
#
load( )
Load published modules.
Returns
array
Since
3.2
|
public static
array
|
|
public static
array
|
#
cleanModuleList( array $modules )
Clean the module list
Parameters
- $modules
array - $modules Array with module objects
Returns
array
|
public 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
Parameters
- $module
object - $module Module object
- $moduleparams
object - $moduleparams Module parameters
- $cacheparams
object - $cacheparams Module cache parameters - id or URL parameters, depending on the
module cache mode
Returns
string
Since
1.6
See
|
Magic methods summary