Skip to content

Commit 72a6da8

Browse files
committed
add js docs
1 parent 453c4a0 commit 72a6da8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/packages/core/workspace/controllers/workspace-route-manager.controller.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
22
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
33
import type { UmbRoute } from '@umbraco-cms/backoffice/router';
44

5+
/**
6+
* The workspace route manager.
7+
* @class UmbWorkspaceRouteManager
8+
* @augments {UmbControllerBase}
9+
*/
510
export class UmbWorkspaceRouteManager extends UmbControllerBase {
611
//
712
#routes = new UmbArrayState<UmbRoute>([], (x) => x.path);
813
public readonly routes = this.#routes.asObservable();
914

15+
/**
16+
* Set the routes for the workspace.
17+
* @param {Array<UmbRoute>} routes The routes for the workspace.
18+
* @memberof UmbWorkspaceRouteManager
19+
*/
1020
setRoutes(routes: Array<UmbRoute>) {
1121
this.#routes.setValue([
1222
...routes,
@@ -16,4 +26,13 @@ export class UmbWorkspaceRouteManager extends UmbControllerBase {
1626
},
1727
]);
1828
}
29+
30+
/**
31+
* Get the routes for the workspace.
32+
* @returns {Array<UmbRoute>} The routes for the workspace.
33+
* @memberof UmbWorkspaceRouteManager
34+
*/
35+
getRoutes(): Array<UmbRoute> {
36+
return this.#routes.getValue();
37+
}
1938
}

0 commit comments

Comments
 (0)