@@ -191,6 +191,13 module Redmine #:nodoc: | |||
|
191 | 191 | puts "Listener added for #{hook_name.to_s}" |
|
192 | 192 | end |
|
193 | 193 | end |
|
194 | ||
|
195 | # Removes all listeners | |
|
196 | def clear_listeners() | |
|
197 | @@hooks.each do |hook, registrations| | |
|
198 | @@hooks[hook] = [] | |
|
199 | end | |
|
200 | end | |
|
194 | 201 | |
|
195 | 202 | # Run all the hooks for +hook_name+ passing in +context+ |
|
196 | 203 | def call_hook(hook_name, context = { }) |
General Comments 0
You need to be logged in to leave comments.
Login now