Skip to content

Commit

Permalink
Update DrupalGetForm.php (#179)
Browse files Browse the repository at this point in the history
* Update DrupalGetForm.php

to support multiple args

* Update DrupalGetForm.php

add type for args
  • Loading branch information
brihx001 authored Sep 13, 2024
1 parent 4dc258f commit fbdcbbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Form/DrupalGetForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public function getFormId(): string
return $this->formId;
}

public function buildForm(array $form, FormStateInterface $form_state): array
public function buildForm(array $form, FormStateInterface $form_state, mixed ...$args): array
{
return ($this->formId)($form, $form_state);
return ($this->formId)($form, $form_state, ...$args);
}

public function validateForm(array &$form, FormStateInterface $form_state)
Expand Down

0 comments on commit fbdcbbd

Please sign in to comment.