Explorar el Código

[Controller] refactored the controller class to take benefit from the new methods in the Configurator class.

Hugo Hamon hace 14 años
padre
commit
b6990c7c13
Se han modificado 1 ficheros con 2 adiciones y 14 borrados
  1. 2 14
      Controller/ConfiguratorController.php

+ 2 - 14
Controller/ConfiguratorController.php

@@ -60,21 +60,9 @@ class ConfiguratorController extends ContainerAware
     {
         $configurator = $this->container->get('sensio.distribution.webconfigurator');
 
-        $steps = $configurator->getSteps();
-
-        $majors = array();
-        $minors = array();
-
         // Trying to get as much requirements as possible
-        foreach ($steps as $step) {
-            foreach ($step->checkRequirements() as $major) {
-                $majors[] = $major;
-            }
-
-            foreach ($step->checkOptionalSettings() as $minor) {
-                $minors[] = $minor;
-            }
-        }
+        $majors = $configurator->getRequirements();
+        $minors = $configurator->getOptionalSettings();
 
         $url = $this->container->get('router')->generate('_configurator_step', array('index' => 0));