/** * @param ServiceLocatorInterface $serviceLocator * @return StepPluginManager */ public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('Config'); $configInstance = new Config($config['wizard_steps']); $stepPluginManager = new StepPluginManager($configInstance); $stepPluginManager->setServiceLocator($serviceLocator); return $stepPluginManager; }
/** * @param string $name * @param array $options * @return \Wizard\Step\StepInterface */ public function create($name, array $options = []) { $step = $this->stepPluginManager->get($name); if (isset($options['form'])) { $form = $this->formPluginManager->get($options['form']); $step->setForm($form); unset($options['form']); } $step->setName($name); $step->getOptions()->setFromArray($options); return $step; }