You are here

public function FormBaseAlterEvent::__construct in Hook Event Dispatcher 8

FormBaseAlterEvent constructor.

Parameters

array $form: Nested array of form elements that comprise the form.

\Drupal\Core\Form\FormStateInterface $formState: The current state of the form. The arguments that \Drupal::formBuilder()->getForm() was originally called with are available in the array $form_state->getBuildInfo()['args'].

string $formId: String representing the name of the form itself. Typically this is the name of the function that generated the form.

string $baseFormId: The base form id.

Overrides BaseFormEvent::__construct

File

src/Event/Form/FormBaseAlterEvent.php, line 34

Class

FormBaseAlterEvent
Class FormBaserAlterEvent.

Namespace

Drupal\hook_event_dispatcher\Event\Form

Code

public function __construct(array &$form, FormStateInterface $formState, $formId, $baseFormId) {
  parent::__construct($form, $formState, $formId);
  $this->baseFormId = $baseFormId;
}