diff --git a/CLChillMainBundle.php b/CLChillMainBundle.php new file mode 100644 index 000000000..583e1fbd3 --- /dev/null +++ b/CLChillMainBundle.php @@ -0,0 +1,9 @@ +render('CLChillMainBundle:Default:index.html.twig', array('name' => $name)); + } +} diff --git a/DependencyInjection/CLChillMainExtension.php b/DependencyInjection/CLChillMainExtension.php new file mode 100644 index 000000000..82b4e68ec --- /dev/null +++ b/DependencyInjection/CLChillMainExtension.php @@ -0,0 +1,28 @@ +processConfiguration($configuration, $configs); + + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.yml'); + } +} diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php new file mode 100644 index 000000000..bff6c7c4f --- /dev/null +++ b/DependencyInjection/Configuration.php @@ -0,0 +1,29 @@ +root('cl_chill_main'); + + // Here you should define the parameters that are allowed to + // configure your bundle. See the documentation linked above for + // more information on that topic. + + return $treeBuilder; + } +} diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml new file mode 100644 index 000000000..624859b1f --- /dev/null +++ b/Resources/config/routing.yml @@ -0,0 +1,3 @@ +cl_chill_main_homepage: + pattern: /hello/{name} + defaults: { _controller: CLChillMainBundle:Default:index } diff --git a/Resources/config/services.yml b/Resources/config/services.yml new file mode 100644 index 000000000..addfc89a7 --- /dev/null +++ b/Resources/config/services.yml @@ -0,0 +1,7 @@ +parameters: +# cl_chill_main.example.class: CL\Chill\MainBundle\Example + +services: +# cl_chill_main.example: +# class: %cl_chill_main.example.class% +# arguments: [@service_id, "plain_value", %parameter%] diff --git a/Resources/doc/index.rst b/Resources/doc/index.rst new file mode 100644 index 000000000..e69de29bb diff --git a/Resources/translations/messages.fr.xlf b/Resources/translations/messages.fr.xlf new file mode 100644 index 000000000..fd59e6c16 --- /dev/null +++ b/Resources/translations/messages.fr.xlf @@ -0,0 +1,11 @@ + + + + + + Symfony2 is great + J'aime Symfony2 + + + + diff --git a/Resources/views/Default/index.html.twig b/Resources/views/Default/index.html.twig new file mode 100644 index 000000000..4ce626e9b --- /dev/null +++ b/Resources/views/Default/index.html.twig @@ -0,0 +1 @@ +Hello {{ name }}! diff --git a/Tests/Controller/DefaultControllerTest.php b/Tests/Controller/DefaultControllerTest.php new file mode 100644 index 000000000..d728906dd --- /dev/null +++ b/Tests/Controller/DefaultControllerTest.php @@ -0,0 +1,17 @@ +request('GET', '/hello/Fabien'); + + $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); + } +}