@@ -4,6 +4,7 @@ import {FormPresenter} from "@/presenters";
44import { FormState , FormViewProps } from "@/types" ;
55import { EventContext } from "@/event" ;
66import { FormInstance } from "@/instance" ;
7+ import { LayoutContext } from "@/layout" ;
78
89
910export class FormContextScope {
@@ -13,17 +14,20 @@ export class FormContextScope {
1314 private readonly validate : FormValidate ;
1415 private readonly presenter : FormPresenter ;
1516 private readonly eventContext : EventContext ;
17+ private readonly layoutContext : LayoutContext ;
1618
1719 constructor ( props :FormViewProps ,
1820 instance : FormInstance ,
1921 validate : FormValidate ,
2022 eventContext : EventContext ,
23+ layoutContext : LayoutContext ,
2124 presenter : FormPresenter ) {
2225 this . props = props ;
2326 this . instance = instance ;
2427 this . presenter = presenter ;
2528 this . eventContext = eventContext ;
2629 this . validate = validate ;
30+ this . layoutContext = layoutContext ;
2731 this . instance . setPresenter ( presenter ) ;
2832 }
2933
@@ -39,6 +43,10 @@ export class FormContextScope {
3943 return this . instance . getFormControl ( formCode ) ;
4044 }
4145
46+ public getLayoutContext ( ) {
47+ return this . layoutContext ;
48+ }
49+
4250 public getFormInstance ( ) {
4351 return this . instance ;
4452 }
0 commit comments