34b00a8f8aebaf34444469df81c1eece9b174c72
[yaffs-website] / Wizard / WizardFactoryInterface.php
1 <?php
2 namespace Drupal\ctools\Wizard;
3
4 interface WizardFactoryInterface {
5   /**
6    * Get the wizard form.
7    *
8    * @param FormWizardInterface $wizard
9    *   The form wizard
10    * @param array $parameters
11    *   The array of default parameters specific to this wizard.
12    * @param bool $ajax
13    *   Whether or not this wizard is displayed via ajax modals.
14    *
15    * @return array
16    */
17   public function getWizardForm(FormWizardInterface $wizard, array $parameters = [], $ajax = FALSE);
18
19   /**
20    * @param string $class
21    *   A class name implementing FormWizardInterface.
22    * @param array $parameters
23    *   The array of parameters specific to this wizard.
24    *
25    * @return \Drupal\ctools\Wizard\FormWizardInterface
26    */
27   public function createWizard($class, array $parameters);
28
29   /**
30    * Get the wizard form state.
31    *
32    * @param \Drupal\ctools\Wizard\FormWizardInterface $wizard
33    *   The form wizard.
34    * @param array $parameters
35    *   The array of parameters specific to this wizard.
36    * @param bool $ajax
37    *
38    * @return \Drupal\Core\Form\FormState
39    */
40   public function getFormState(FormWizardInterface $wizard, array $parameters, $ajax = FALSE);
41
42 }