# Class FormSystemControlDirective<T>

#### Type Parameters

- T

#### Hierarchy (view full)

- ExtractDataSourcesMixin
- ControlValueAccessor
- OnInit
  - FormSystemControlDirective

#### Implements

- ControlValueAccessor
- OnInit

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:36
- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:44

#####
Index

### Constructors

constructor

### Properties

cfr
componentRef
control
controlId
dataSourceLoader
injector
parent
viewContainerRef

### Methods

createComponent
extractComponent
extractComponentProperties
extractControl
extractDataSources
extractFormDefinition
ngOnInit
registerOnChange
registerOnTouched
setComponentProperties
setDataSources
setDisabledState
writeValue

## Constructors

### constructor

- new FormSystemControlDirective<T>(parent, cfr, viewContainerRef, dataSourceLoader, injector): FormSystemControlDirective<T>

- #### Type Parameters

  - T

  #### Parameters

  - parent: ControlContainer
  - cfr: ComponentFactoryResolver
  - viewContainerRef: ViewContainerRef
  - dataSourceLoader: DataSourceLoader
  - injector: Injector

  #### Returns FormSystemControlDirective<T>

  Inherited from ExtractDataSourcesMixin.constructor

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:56

## Properties

### `Private` `Readonly` cfr

cfr: ComponentFactoryResolver

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:60

### `Protected` componentRef

componentRef: ComponentRef<ControlValueAccessor & Partial<ControlWithDataSource<any, any>>>

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:54

### `Protected` control

control: RxapFormControl<any, any, any>

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:52

### controlId

controlId: string

Defines the form control id

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:50

### `Private` `Readonly` dataSourceLoader

dataSourceLoader: DataSourceLoader

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:64

### `Private` `Readonly` injector

injector: Injector

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:66

### `Private` `Readonly` parent

parent: ControlContainer

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:58

### `Private` `Readonly` viewContainerRef

viewContainerRef: ViewContainerRef

- Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:62

## Methods

### `Private` createComponent

- createComponent(formDefinition): ComponentRef<ControlValueAccessor>

- #### Parameters

  - formDefinition: FormDefinition<any, any, any>

  #### Returns ComponentRef<ControlValueAccessor>

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:139

### `Private` extractComponent

- extractComponent(formDefinition): Constructor<ControlValueAccessor>

- #### Parameters

  - formDefinition: FormDefinition<any, any, any>

  #### Returns Constructor<ControlValueAccessor>

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:173

### `Private` extractComponentProperties

- extractComponentProperties(formDefinition): Record<string, any>

- #### Parameters

  - formDefinition: FormDefinition<any, any, any>

  #### Returns Record<string, any>

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:190

### `Private` extractControl

- extractControl(): RxapFormControl<any, any, any>

- #### Returns RxapFormControl<any, any, any>

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:145

### `Protected` extractDataSources

- extractDataSources(formDefinition, controlId): Map<string, UseDataSourceValue<any, any>>

- #### Parameters

  - formDefinition: FormDefinition<any, any, any>
  - controlId: string

  #### Returns Map<string, UseDataSourceValue<any, any>>

  Inherited from ExtractDataSourcesMixin.extractDataSources

  - Defined in packages/angular/form-system/src/lib/mixins/extract-data-sources.mixin.ts:9

### `Private` extractFormDefinition

- extractFormDefinition(): FormDefinition<any, any, any>

- #### Returns FormDefinition<any, any, any>

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:163

### ngOnInit

- ngOnInit(): void

- #### Returns void

  Inherited from OnInit.ngOnInit

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:70

### registerOnChange

- registerOnChange(fn): void

- #### Parameters

  - fn: ((value) => void)
    - - (value): void

      - #### Parameters

        - value: any

        #### Returns void

  Inherited from ControlValueAccessor.registerOnChange

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:85

### registerOnTouched

- registerOnTouched(fn): void

- #### Parameters

  - fn: (() => void)
    - - (): void

      - #### Returns void

  Inherited from ControlValueAccessor.registerOnTouched

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:89

### `Private` setComponentProperties

- setComponentProperties(formDefinition, component): void

- #### Parameters

  - formDefinition: FormDefinition<any, any, any>
  - component: any

  #### Returns void

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:130

### `Private` setDataSources

- setDataSources(formDefinition, component): void

- #### Parameters

  - formDefinition: FormDefinition<any, any, any>
  - component: Partial<ControlWithDataSource<any, any>>

  #### Returns void

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:103

### setDisabledState

- setDisabledState(isDisabled): void

- #### Parameters

  - isDisabled: boolean

  #### Returns void

  Inherited from ControlValueAccessor.setDisabledState

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:97

### writeValue

- writeValue(value): void

- #### Parameters

  - value: any

  #### Returns void

  Inherited from ControlValueAccessor.writeValue

  - Defined in packages/angular/form-system/src/lib/form-system-control.directive.ts:93