This is a singleton object. Do not create an instance.
Registry of all ThemeProviders available to the system. New themes should include an ExtensionManager SPI implementation which will register and unregister them here.
- Version:
- 17.1.5
- Source:
- See:
Example
define([
'layout.dt/js/api/ThemeProviderRegistry',
'API.Example/js/SimpleThemeProvider'
], function(
ThemeProviderRegistry,
SimpleThemeProvider
) {
'use strict';
var ThemeExtensionManager = function () {
};
ThemeExtensionManager.prototype.initialise = function (dependencies) {
ThemeProviderRegistry.registerThemeProvider(SimpleThemeProvider);
};
ThemeExtensionManager.prototype.destroy = function (dependencies) {
ThemeProviderRegistry.unregisterThemeProvider(SimpleThemeProvider);
};
ThemeExtensionManager.prototype.generateRuntimeCode = function(dependencies) {
};
return new ThemeExtensionManager();
});
Methods
registerThemeProvider(themeProvider)
stable API
Registers the given theme provider.
Parameters:
Name | Type | Description |
---|---|---|
themeProvider |
layout.dt/js/spi/ThemeProvider | The theme provider to register |
- Version:
- 17.1.5
- Source:
unregisterThemeProvider(themeProvider)
stable API
Unregister the supplied theme provider, if it's registered.
Parameters:
Name | Type | Description |
---|---|---|
themeProvider |
layout.dt/js/spi/ThemeProvider | the theme provider to unregister |
- Version:
- 17.1.5
- Source: