Added Redmine::Plugin::Hook::Manager.clear_listeners to remove all hook listeners.
This commit is contained in:
@@ -192,6 +192,13 @@ module Redmine #:nodoc:
|
|||||||
end
|
end
|
||||||
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+
|
# Run all the hooks for +hook_name+ passing in +context+
|
||||||
def call_hook(hook_name, context = { })
|
def call_hook(hook_name, context = { })
|
||||||
response = ''
|
response = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user