You are here

public function ComponentSectionForm::form in Module Builder 8.3

Gets the actual form array to be built.

Overrides EntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

3 calls to ComponentSectionForm::form()
ModuleHooksForm::form in src/Form/ModuleHooksForm.php
Gets the actual form array to be built.
ModuleMiscForm::form in src/Form/ModuleMiscForm.php
Gets the actual form array to be built.
ModuleNameForm::form in src/Form/ModuleNameForm.php
Gets the actual form array to be built.
3 methods override ComponentSectionForm::form()
ModuleHooksForm::form in src/Form/ModuleHooksForm.php
Gets the actual form array to be built.
ModuleMiscForm::form in src/Form/ModuleMiscForm.php
Gets the actual form array to be built.
ModuleNameForm::form in src/Form/ModuleNameForm.php
Gets the actual form array to be built.

File

src/Form/ComponentSectionForm.php, line 58

Class

ComponentSectionForm
Generic form for entering a section of data for a component.

Namespace

Drupal\module_builder\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form = $this
    ->componentPropertiesForm($form, $form_state);
  $form['#attached']['library'][] = 'module_builder/typed_data_defaults';
  $form['#attached']['drupalSettings']['moduleBuilder']['typedDataDefaults']['defaults'] = [];
  return $form;
}