@chatterton/angular2-schema-form
Version:
Angular2 Schema Form (DISCLAIMER: it is not related to angular-schema-form)
18 lines (13 loc) • 304 B
text/typescript
import { Action } from './action';
export class ActionRegistry {
actions: {[key: string]: Action} = {};
clear() {
this.actions = {};
}
register(actionId: string, action: Action) {
this.actions[actionId] = action;
}
get(actionId: string) {
return this.actions[actionId];
}
}