aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hooks/forwardingemitter.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hooks/forwardingemitter.php')
-rw-r--r--lib/hooks/forwardingemitter.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/hooks/forwardingemitter.php b/lib/hooks/forwardingemitter.php
index 518641ac7cf..1aacc4012e0 100644
--- a/lib/hooks/forwardingemitter.php
+++ b/lib/hooks/forwardingemitter.php
@@ -38,5 +38,13 @@ abstract class ForwardingEmitter extends BasicEmitter {
*/
protected function forward($emitter) {
$this->forwardEmitters[] = $emitter;
+
+ //forward all previously connected hooks
+ foreach ($this->listeners as $key => $listeners) {
+ list($scope, $method) = explode('::', $key, 2);
+ foreach ($listeners as $listener) {
+ $emitter->listen($scope, $method, $listener);
+ }
+ }
}
}