mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-11 11:43:08 +00:00
Added Redmine::Plugin::Hook::Manager.clear_listeners to remove all hook listeners.
This commit is contained in:
parent
e7309d8c57
commit
cb485c92ef
@ -191,6 +191,13 @@ module Redmine #:nodoc:
|
||||
puts "Listener added for #{hook_name.to_s}"
|
||||
end
|
||||
end
|
||||
|
||||
# Removes all listeners
|
||||
def clear_listeners()
|
||||
@@hooks.each do |hook, registrations|
|
||||
@@hooks[hook] = []
|
||||
end
|
||||
end
|
||||
|
||||
# Run all the hooks for +hook_name+ passing in +context+
|
||||
def call_hook(hook_name, context = { })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user