@univerjs/core v0.4.2 • Docs
Class: ResourceManagerService
Extends
Implements
Constructors
new ResourceManagerService()
new ResourceManagerService(): ResourceManagerService
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
register$ | public | Observable <IResourceHook <any >> | undefined | - | submodules/univer/packages/core/src/services/resource-manager/resource-manager.service.ts:27 (opens in a new tab) |
Methods
dispose()
dispose(): void
Returns
void
Overrides
Defined in
disposePluginResource()
disposePluginResource(pluginName): void
Parameters
Parameter | Type |
---|---|
pluginName | `SHEET_${string}_PLUGIN` | `DOC_${string}_PLUGIN` |
Returns
void
Implementation of
IResourceManagerService
.disposePluginResource
Defined in
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getAllResourceHooks()
getAllResourceHooks(): IResourceHook<any>[]
Returns
IResourceHook
<any
>[]
Implementation of
IResourceManagerService
.getAllResourceHooks
Defined in
getResources()
getResources(unitId)
getResources(unitId): IResources
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Deprecated
You should get resource with type specified.
Implementation of
IResourceManagerService
.getResources
Defined in
getResources(unitId, type)
getResources(unitId, type): IResources
Parameters
Parameter | Type |
---|---|
unitId | string |
type | UniverInstanceType |
Returns
Deprecated
You should get resource with type specified.
Implementation of
IResourceManagerService
.getResources
Defined in
getResourcesByType()
getResourcesByType(unitId, type): {
data: string;
name: resourceHook.pluginName;
}[]
Parameters
Parameter | Type |
---|---|
unitId | string |
type | UniverInstanceType |
Returns
{
data
: string
;
name
: resourceHook.pluginName
;
}[]
Implementation of
IResourceManagerService
.getResourcesByType
Defined in
loadResources()
loadResources(unitId, resources?): void
Parameters
Parameter | Type |
---|---|
unitId | string |
resources ? | IResources |
Returns
void
Implementation of
IResourceManagerService
.loadResources
Defined in
registerPluginResource()
registerPluginResource<T>(hook): IDisposable
Type Parameters
Type Parameter | Default type |
---|---|
T | unknown |
Parameters
Parameter | Type |
---|---|
hook | IResourceHook <T > |
Returns
Implementation of
IResourceManagerService
.registerPluginResource
Defined in
unloadResources()
unloadResources(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Implementation of
IResourceManagerService
.unloadResources