Entity Action: Adds the execute abstract method
Also ensures the `execute` method is on the base interface for both `UmbEntityAction` and `UmbEntityBulkAction`. Resolves #1288
This commit is contained in:
committed by
Jacob Overgaard
parent
4195ad77b5
commit
574559cb83
@@ -1,12 +1,16 @@
|
||||
import type { UmbAction} from '../action/index.js';
|
||||
import type { UmbAction } from '../action/index.js';
|
||||
import { UmbActionBase } from '../action/index.js';
|
||||
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export interface UmbEntityAction<RepositoryType> extends UmbAction<RepositoryType> {
|
||||
unique: string;
|
||||
execute(): Promise<void>;
|
||||
}
|
||||
|
||||
export class UmbEntityActionBase<RepositoryType> extends UmbActionBase<RepositoryType> {
|
||||
export abstract class UmbEntityActionBase<RepositoryType>
|
||||
extends UmbActionBase<RepositoryType>
|
||||
implements UmbEntityAction<RepositoryType>
|
||||
{
|
||||
entityType: string;
|
||||
unique: string;
|
||||
repositoryAlias: string;
|
||||
@@ -17,4 +21,6 @@ export class UmbEntityActionBase<RepositoryType> extends UmbActionBase<Repositor
|
||||
this.unique = unique;
|
||||
this.repositoryAlias = repositoryAlias;
|
||||
}
|
||||
|
||||
abstract execute(): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controlle
|
||||
export interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<RepositoryType> {
|
||||
selection: Array<string>;
|
||||
setSelection(selection: Array<string>): void;
|
||||
execute(): Promise<void>;
|
||||
}
|
||||
|
||||
export abstract class UmbEntityBulkActionBase<RepositoryType = unknown>
|
||||
|
||||
Reference in New Issue
Block a user