ohif-viewer/docs/latest/extensions/lifecycle/pre-registration.md
2019-12-07 00:49:40 -05:00

22 lines
516 B
Markdown

# Lifecylce Hook: preRegistration
If an extension defines the `preRegistration` lifecycle hook, it is called
before any modules are registered in the `ExtensionManager`.
```js
export default {
id: 'MyExampleExtension',
preRegistration({ servicesManager, commandsManager, configuration }) {
console.log('Wiring up important stuff.');
window.importantStuff = () => {
console.log(configuration);
};
console.log('Important stuff has been wired.');
window.importantStuff();
},
};
```