You are here

protected function WizardFormController::getFormObject in Chaos Tool Suite (ctools) 8.3

Wizards are not instantiated as simply as forms, so this method is unused.

Overrides FormController::getFormObject

1 call to WizardFormController::getFormObject()
WizardFormController::getContentResult in src/Controller/WizardFormController.php
Invokes the form and returns the result.

File

src/Controller/WizardFormController.php, line 61

Class

WizardFormController
Wrapping controller for wizard forms that serve as the main page body.

Namespace

Drupal\ctools\Controller

Code

protected function getFormObject(RouteMatchInterface $route_match, $form_arg) {
  if (!is_subclass_of($form_arg, '\\Drupal\\ctools\\Wizard\\FormWizardInterface')) {
    throw new \Exception("The _wizard default must reference a class instance of \\Drupal\\ctools\\Wizard\\FormWizardInterface.");
  }
  $parameters = $route_match
    ->getParameters()
    ->all();
  $parameters += $form_arg::getParameters();
  $parameters['route_match'] = $route_match;
  return $this->wizardFactory
    ->createWizard($form_arg, $parameters);
}