1
0
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:
Eric Davis 2008-07-28 17:01:59 -07:00
parent e7309d8c57
commit cb485c92ef

View File

@ -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 = { })