debug helper methods

This commit is contained in:
Niels Lyngsø
2024-05-17 11:42:11 +02:00
parent 317e8c9d2e
commit c76a40d11a
2 changed files with 7 additions and 0 deletions

View File

@@ -84,6 +84,9 @@ export abstract class UmbBlockEntriesContext<
layoutOf(contentUdi: string) {
return this._layoutEntries.asObservablePart((source) => source.find((x) => x.contentUdi === contentUdi));
}
getLayoutOf(contentUdi: string) {
return this._layoutEntries.getValue().find((x) => x.contentUdi === contentUdi);
}
setLayouts(layouts: Array<BlockLayoutType>) {
return this._layoutEntries.setValue(layouts);
}

View File

@@ -79,6 +79,10 @@ export abstract class UmbBlockManagerContext<
setLayouts(layouts: Array<BlockLayoutType>) {
this._layouts.setValue(layouts);
}
// TODO: Remove this as it is just for debug purpose...?
getLayouts(): Array<BlockLayoutType> {
return this._layouts.getValue();
}
setContents(contents: Array<UmbBlockDataType>) {
this.#contents.setValue(contents);
}