mirror of
https://github.com/redmine/redmine.git
synced 2026-07-06 07:57:55 +02:00
Added Redmine::Plugin::Hook::Manager.clear_listeners to remove all hook listeners.
This commit is contained in:
@@ -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 = { })
|
||||
|
||||
Reference in New Issue
Block a user