Module: CamaleonCms::HooksHelper
- Included in:
- CamaleonController, EmailHelper, HtmlMailer
- Defined in:
- app/helpers/camaleon_cms/hooks_helper.rb
Instance Method Summary collapse
-
#hook_run(plugin, hook_key, params = nil) ⇒ Object
execute hooks for plugin_key with action name hook_key non public method plugin: plugin configuration (config.json) hook_key: hook key params: params for hook.
-
#hook_skip(hook_function_name) ⇒ Object
skip hook function with name: hook_function_name.
-
#hooks_run(hook_key, params = nil) ⇒ Object
execute all hooks from enabled plugins with key hook_key non public method hook_key: hook key params: params for hook.
Instance Method Details
#hook_run(plugin, hook_key, params = nil) ⇒ Object
execute hooks for plugin_key with action name hook_key non public method plugin: plugin configuration (config.json) hook_key: hook key params: params for hook
7 8 9 |
# File 'app/helpers/camaleon_cms/hooks_helper.rb', line 7 def hook_run(plugin, hook_key, params = nil) _do_hook(plugin, hook_key, params) end |
#hook_skip(hook_function_name) ⇒ Object
skip hook function with name: hook_function_name
22 23 24 |
# File 'app/helpers/camaleon_cms/hooks_helper.rb', line 22 def hook_skip(hook_function_name) @_hooks_skip << hook_function_name end |
#hooks_run(hook_key, params = nil) ⇒ Object
execute all hooks from enabled plugins with key hook_key non public method hook_key: hook key params: params for hook
15 16 17 18 19 |
# File 'app/helpers/camaleon_cms/hooks_helper.rb', line 15 def hooks_run(hook_key, params = nil) PluginRoutes.enabled_apps(current_site, current_theme.slug).each do |plugin| _do_hook(plugin, hook_key, params) end end |