public function ModuleBuilderComponentFormBase::form in Module Builder 7.2
File
- includes/
module_builder.form.inc, line 92
Class
- ModuleBuilderComponentFormBase
- Backport of ComponentFormBase from 8.x-3.x version.
Code
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
$component_properties_to_use = $this
->getFormComponentProperties();
// Get the module entity's current values, to populate form defaults.
$module = $this->entity;
$this->moduleEntityData = $module
->get('data') ?? [];
// dsm($this->moduleEntityData);
$form = $this
->componentPropertiesForm($form, $form_state, $component_properties_to_use);
// \Kint::$maxLevels = 0;
// dsm($form);
return $form;
}