[MODULES] Add InitiializeModule and CleanupModule events, similar to v2

This commit is contained in:
Hugo Sales 2021-08-22 13:11:46 +01:00
parent 1ee8df1494
commit bda839be7b
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 6 additions and 0 deletions

View File

@ -125,6 +125,8 @@ class Controller extends AbstractController implements EventSubscriberInterface
throw new ClientException(_m('Unsupported format: {format}', ['format' => $format]), 406); // 406 Not Acceptable
}
Event::handle('CleanupModule');
return $event;
}
@ -149,6 +151,9 @@ class Controller extends AbstractController implements EventSubscriberInterface
}
}
} while ($except != null && ($except = $except->getPrevious()) != null);
Event::handle('CleanupModule');
return $event;
}

View File

@ -204,6 +204,7 @@ class GNUsocial implements EventSubscriberInterface
}
$this->initialize();
Event::handle('InitializeModule');
return $event;
}