File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/packages/core/workspace/controllers Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,21 @@ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
2
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api' ;
3
3
import type { UmbRoute } from '@umbraco-cms/backoffice/router' ;
4
4
5
+ /**
6
+ * The workspace route manager.
7
+ * @class UmbWorkspaceRouteManager
8
+ * @augments {UmbControllerBase }
9
+ */
5
10
export class UmbWorkspaceRouteManager extends UmbControllerBase {
6
11
//
7
12
#routes = new UmbArrayState < UmbRoute > ( [ ] , ( x ) => x . path ) ;
8
13
public readonly routes = this . #routes. asObservable ( ) ;
9
14
15
+ /**
16
+ * Set the routes for the workspace.
17
+ * @param {Array<UmbRoute> } routes The routes for the workspace.
18
+ * @memberof UmbWorkspaceRouteManager
19
+ */
10
20
setRoutes ( routes : Array < UmbRoute > ) {
11
21
this . #routes. setValue ( [
12
22
...routes ,
@@ -16,4 +26,13 @@ export class UmbWorkspaceRouteManager extends UmbControllerBase {
16
26
} ,
17
27
] ) ;
18
28
}
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
+ }
19
38
}
You can’t perform that action at this time.
0 commit comments