Plugin/Events/Module: Difference between revisions
From Joomla! Documentation
m Fix indent |
|||
| (18 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
<noinclude><languages /></noinclude> | |||
<translate><!--T:1--> | |||
In a standard installation of Joomla! we have several predefined Module events which, when triggered, call functions in the associated plugins. | In a standard installation of Joomla! we have several predefined Module events which, when triggered, call functions in the associated plugins.</translate> | ||
==onRenderModule== | ==onRenderModule== | ||
===Description=== | <translate> | ||
This is an event that is called when a module on the front- or back-end is | ===Description=== <!--T:2--> | ||
===Parameters=== | </translate> | ||
*<code>&module</code> A reference to a Module object that holds all the data of the module | <translate><!--T:3--> | ||
*<code>&attribs</code> An array of attributes for the module | This is an event that is called when a module on the front- or back-end is rendered.</translate> | ||
===Return Value=== | <translate> | ||
None. Result will be omitted. | ===Parameters=== <!--T:4--> | ||
</translate> | |||
*<code>&module</code> <translate><!--T:5--> | |||
A reference to a Module object that holds all the data of the module</translate> | |||
*<code>&attribs</code> <translate><!--T:6--> | |||
An array of attributes for the module</translate> | |||
<translate> | |||
===Return Value=== <!--T:7--> | |||
</translate> | |||
<translate><!--T:8--> | |||
None. Result will be omitted.</translate> | |||
== | ==onAfterRenderModule== | ||
===Description=== | <translate> | ||
This is an event that is called when after a module is | ===Description=== <!--T:9--> | ||
===Parameters=== | </translate> | ||
*<code>&module</code> A reference to a Module object that holds all the data of the module | <translate><!--T:10--> | ||
*<code>&attribs</code> | This is an event that is called when after a module is rendered on the back- or front-end</translate> | ||
===Return Value=== | <translate> | ||
None. Result will be omitted. | ===Parameters=== <!--T:11--> | ||
</translate> | |||
*<code>&module</code> <translate><!--T:12--> | |||
A reference to a Module object that holds all the data of the module</translate> | |||
*<code>&attribs</code> <translate><!--T:13--> | |||
An array of attributes for the module</translate> | |||
<translate> | |||
===Return Value=== <!--T:14--> | |||
</translate> | |||
<translate><!--T:15--> | |||
None. Result will be omitted.</translate> | |||
== | == onAfterRenderModules == | ||
===Description=== | === Description === | ||
This is an event that is called when after all modules are rendered on the back- or front-end for a given module position. Introduced in {{JVer | 3.7}} | |||
===Parameters=== | === Parameters === | ||
*<code>&buffer</code> | |||
A reference to the output html of the modules being rendered | |||
*<code>¶ms</code> | |||
An array of parameters for the module renderer | |||
===Return Value=== | === Return Value === | ||
None. Result will be omitted. | |||
=== | ==onPrepareModuleList== | ||
<translate> | |||
===Description=== <!--T:16--> | |||
</translate> | |||
<translate><!--T:17--> | |||
This is an event that is called before the list of modules that must be rendered is created. If the <code>&modules</code> parameter is an array of module objects, the default module list generated by Joomla! is ignored.</translate> | |||
=== | <translate> | ||
===Parameters=== <!--T:18--> | |||
</translate> | |||
<translate><!--T:19--> | |||
*<code>&modules</code> Reference to a empty variable for the list of modules</translate> | |||
<translate> | |||
===Return Value=== <!--T:20--> | |||
</translate> | |||
<translate><!--T:21--> | |||
None. Result will be omitted.</translate> | |||
==onAfterModuleList== | ==onAfterModuleList== | ||
===Description=== | <translate> | ||
===Description=== <!--T:22--> | |||
===Parameters=== | </translate> | ||
<translate><!--T:23--> | |||
===Return Value=== | This is an event that is called after the list of modules that must be rendered is created.</translate> | ||
<translate> | |||
===Parameters=== <!--T:24--> | |||
</translate> | |||
*<code>&modules</code> <translate><!--T:25--> | |||
Reference to an array of module objects</translate> | |||
<translate> | |||
===Return Value=== <!--T:26--> | |||
</translate> | |||
<translate><!--T:27--> | |||
None. Result will be omitted.</translate> | |||
==onAfterCleanModuleList== | ==onAfterCleanModuleList== | ||
===Description=== | <translate> | ||
===Description=== <!--T:28--> | |||
===Parameters=== | </translate> | ||
<translate><!--T:29--> | |||
===Return Value=== | This is an event that is called after the module list is cleaned.</translate> | ||
<translate> | |||
===Parameters=== <!--T:30--> | |||
</translate> | |||
*<code>&modules</code> <translate><!--T:31--> | |||
A reference to an array of rendered module objects</translate> | |||
<translate> | |||
===Return Value=== <!--T:32--> | |||
</translate> | |||
<translate><!--T:33--> | |||
None. Result will be omitted.</translate> | |||
<noinclude> | |||
<translate> | |||
<!--T:34--> | |||
[[Category:Plugin Development|Events]] | |||
[[Category:Plugins|PluginsEvents]] | |||
</translate> | |||
</noinclude> | |||
Latest revision as of 22:50, 27 May 2019
In a standard installation of Joomla! we have several predefined Module events which, when triggered, call functions in the associated plugins.
onRenderModule
Description
This is an event that is called when a module on the front- or back-end is rendered.
Parameters
&moduleA reference to a Module object that holds all the data of the module&attribsAn array of attributes for the module
Return Value
None. Result will be omitted.
onAfterRenderModule
Description
This is an event that is called when after a module is rendered on the back- or front-end
Parameters
&moduleA reference to a Module object that holds all the data of the module&attribsAn array of attributes for the module
Return Value
None. Result will be omitted.
onAfterRenderModules
Description
This is an event that is called when after all modules are rendered on the back- or front-end for a given module position. Introduced in
Parameters
&buffer
A reference to the output html of the modules being rendered
¶ms
An array of parameters for the module renderer
Return Value
None. Result will be omitted.
onPrepareModuleList
Description
This is an event that is called before the list of modules that must be rendered is created. If the &modules parameter is an array of module objects, the default module list generated by Joomla! is ignored.
Parameters
&modulesReference to a empty variable for the list of modules
Return Value
None. Result will be omitted.
onAfterModuleList
Description
This is an event that is called after the list of modules that must be rendered is created.
Parameters
&modulesReference to an array of module objects
Return Value
None. Result will be omitted.
onAfterCleanModuleList
Description
This is an event that is called after the module list is cleaned.
Parameters
&modulesA reference to an array of rendered module objects
Return Value
None. Result will be omitted.