Joomla3开发教程

Module事件

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

  • &module A reference to a Module object that holds all the data of the module
  • &attribs An 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

  • &module A reference to a Module object that holds all the data of the module
  • &attribs An 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 Joomla  3.7

Parameters

  • &buffer

A reference to the output html of the modules being rendered

  • &params

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

  • &modules Reference 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

  • &modules Reference 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

  • &modules A reference to an array of rendered module objects

Return Value

None. Result will be omitted.

 


作者:张敏
原文:http://www.joomlachina.cn/shouce/doc/1916?article_id=1961

获取最新资讯

© 广州市番禺区新造草云信息技术咨询服务部版权所有。
粤ICP备13002429号.

Joomla系列教程

站内链接