function OpenModalWizardCommand::__construct

Same name in other branches
  1. 4.0.x src/Ajax/OpenModalWizardCommand.php \Drupal\ctools\Ajax\OpenModalWizardCommand::__construct()

Overrides OpenModalDialogCommand::__construct

File

src/Ajax/OpenModalWizardCommand.php, line 15

Class

OpenModalWizardCommand

Namespace

Drupal\ctools\Ajax

Code

public function __construct($object, $tempstore_id, array $parameters = [], array $dialog_options = [], $settings = NULL) {
    // Instantiate the wizard class properly.
    $parameters += [
        'tempstore_id' => $tempstore_id,
        'machine_name' => NULL,
        'step' => NULL,
    ];
    $form = \Drupal::service('ctools.wizard.factory')->getWizardForm($object, $parameters, TRUE);
    $title = $form['#title'] ?? '';
    $content = $form;
    parent::__construct($title, $content, $dialog_options, $settings);
}