form = $form; $this->formState = $form_state; $this->formId = $form_id; $this->formBuildId = $form_build_id; $this->commands = $commands; } /** * Gets all AJAX commands. * * @return \Drupal\Core\Ajax\CommandInterface[] * Returns all previously added AJAX commands. */ public function getCommands() { return $this->commands; } /** * Gets the form definition. * * @return array */ public function getForm() { return $this->form; } /** * Gets the unique form build ID. * * @return string */ public function getFormBuildId() { return $this->formBuildId; } /** * Gets the unique form ID. * * @return string */ public function getFormId() { return $this->formId; } /** * Gets the form state. * * @return \Drupal\Core\Form\FormStateInterface */ public function getFormState() { return $this->formState; } }