要修改core的程序,应该优先考虑使用event,其次考虑rewrite

以下用于controller action的通用event, 格式:事件名(参数)

// loadLayoutUpdates
controller_action_layout_load_before(action, layout)

// generateLayoutXml
controller_action_layout_generate_xml_before(action, layout)
controller_action_layout_generate_blocks_after(action, layout)

// generateLayoutBlocks
controller_action_layout_generate_blocks_before(action, layout)

// renderLayout
controller_action_layout_render_before
controller_action_layout_render_before_{module_controller_action}

// preDispatch
controller_action_predispatch(controller_action)
controller_action_predispatch_{module_controller_action}(controller_action)

// postDispatch
controller_action_postdispatch(controller_action)
controller_action_postdispatch_{module_controller_action}(controller_action)
controller_action_postdispatch_{route_name}(controller_action)

// norouteAction
controller_action_noroute(action, status)

// noCookiesAction
controller_action_nocookies(action, redirect)

猫之良品
2.5k 声望139 粉丝

资深Drupal, magento与Joomla


引用和评论

0 条评论