diff --git a/simpli-sf3-test-interview/.gitignore b/simpli-sf3-test-interview/.gitignore index 2f75ca1..d334a6b 100644 --- a/simpli-sf3-test-interview/.gitignore +++ b/simpli-sf3-test-interview/.gitignore @@ -15,3 +15,4 @@ !var/SymfonyRequirements.php /vendor/ /web/bundles/ +.idea \ No newline at end of file diff --git a/simpli-sf3-test-interview/src/AppBundle/Controller/DefaultController.php b/simpli-sf3-test-interview/src/AppBundle/Controller/DefaultController.php index cecd334..ca4a32e 100644 --- a/simpli-sf3-test-interview/src/AppBundle/Controller/DefaultController.php +++ b/simpli-sf3-test-interview/src/AppBundle/Controller/DefaultController.php @@ -5,17 +5,19 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; +use AppBundle\Service\InputDataService; class DefaultController extends Controller { /** * @Route("/", name="homepage") */ - public function indexAction(Request $request) + public function indexAction(InputDataService $inputData) { - // replace this example code with whatever you need - return $this->render('default/index.html.twig', [ - 'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR, - ]); + $result = $inputData->process($this->getParameter('inputData')); + + return $this->render('AppBundle:Default:index.html.twig', array( + 'result' => $result + )); } } diff --git a/simpli-sf3-test-interview/src/AppBundle/Resources/views/Default/index.html.twig b/simpli-sf3-test-interview/src/AppBundle/Resources/views/Default/index.html.twig new file mode 100644 index 0000000..e49aa4e --- /dev/null +++ b/simpli-sf3-test-interview/src/AppBundle/Resources/views/Default/index.html.twig @@ -0,0 +1,34 @@ + +
+ + + +| Item1 | +Item2 | +Item1 + item2 | +Paire/impaire | +
|---|---|---|---|
| {{ data[0] }} | +{{ data[1] }} | +{{ data[2] }} | +{{ data[3] }} | +