From 9918c53855320943055b469e89eecb1b753d5d98 Mon Sep 17 00:00:00 2001 From: Juan Romero Date: Wed, 28 Feb 2018 00:20:15 -0400 Subject: [PATCH] creacion bundle proyectos para trabajo pasantias --- .gitignore | 89 ++++++++++++++++++++++ app/AppKernel.php | 1 + app/Resources/views/candidato/new.html.twig | 5 +- app/config/routing.yml | 5 ++ .../Controller/DefaultController.php | 17 +++++ .../DependencyInjection/Configuration.php | 29 +++++++ .../DependencyInjection/UBVProyectosExtension.php | 28 +++++++ .../ProyectosBundle/Resources/config/services.yml | 4 + .../Resources/views/Default/index.html.twig | 1 + .../Tests/Controller/DefaultControllerTest.php | 17 +++++ src/UBV/ProyectosBundle/UBVProyectosBundle.php | 9 +++ 11 files changed, 201 insertions(+), 4 deletions(-) create mode 100644 src/UBV/ProyectosBundle/Controller/DefaultController.php create mode 100644 src/UBV/ProyectosBundle/DependencyInjection/Configuration.php create mode 100644 src/UBV/ProyectosBundle/DependencyInjection/UBVProyectosExtension.php create mode 100644 src/UBV/ProyectosBundle/Resources/config/services.yml create mode 100644 src/UBV/ProyectosBundle/Resources/views/Default/index.html.twig create mode 100644 src/UBV/ProyectosBundle/Tests/Controller/DefaultControllerTest.php create mode 100644 src/UBV/ProyectosBundle/UBVProyectosBundle.php diff --git a/.gitignore b/.gitignore index b2019be..4518e62 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,92 @@ /vendor/ /bin/ /composer.phar + +# -- Symfony2 ----------------------------------------- + app/bootstrap.php.cache + app/bootstrap_cache.php.cache + app/config/parameters.ini + app/config/parameters.yml + app/cache/* + app/logs/* + vendor/* + web/bundles/* + web/css/* + web/js/* + web/uploads/* + + # -- Composer ----------------------------------------- + composer.phar + + # -- PHPUnit ------------------------------------------ + app/phpunit.xml + + # -- Editores ----------------------------------------- + # vim + .*.sw[a-z] + *.un~ + Session.vim + .netrwhist + + # eclipse + *.pydevproject + .project + .metadata + bin/** + tmp/** + tmp/**/* + *.tmp + *.bak + *.swp + *~.nib + local.properties + .classpath + .settings/ + .loadpath + .externalToolBuilders/ + *.launch + .buildpath + + # phpstorm + .idea/ + + # textmate + *.tmproj + *.tmproject + tmtags + + # sublimetext + /*.sublime-project + *.sublime-workspace + + # netbeans + nbproject/private/ + nbproject/ + build/ + nbbuild/ + dist/ + nbdist/ + nbactions.xml + nb-configuration.xml + + # -- Sistemas Operativos ------------------------------ + # Windows + Thumbs.db + ehthumbs.db + Desktop.ini + $RECYCLE.BIN/ + + # Linux + .* + .gitignore + !.htaccess + *~ + + # Mac OS X + .DS_Store + .AppleDouble + .LSOverride + Icon + ._* + .Spotlight-V100 + .Trashes diff --git a/app/AppKernel.php b/app/AppKernel.php index 3589998..d007c0d 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -21,6 +21,7 @@ class AppKernel extends Kernel new UBV\SurUbvBundle\UBVSurUbvBundle(), new FOS\UserBundle\FOSUserBundle(), new NoiseLabs\Bundle\NuSOAPBundle\NoiseLabsNuSOAPBundle(), + new UBV\ProyectosBundle\UBVProyectosBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { diff --git a/app/Resources/views/candidato/new.html.twig b/app/Resources/views/candidato/new.html.twig index 14f973b..a0452ba 100644 --- a/app/Resources/views/candidato/new.html.twig +++ b/app/Resources/views/candidato/new.html.twig @@ -139,8 +139,6 @@
-{{ form_label(form.estadoCivil) }} - {{ form_widget(form.estadoCivil) }} {% if form.fecha_nacimiento.vars.errors[0].message is defined %} {{ form.fecha_nacimiento.vars.errors[0].message }} @@ -152,8 +150,7 @@
- - +
diff --git a/app/config/routing.yml b/app/config/routing.yml index 4c4193a..e312e03 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,3 +1,8 @@ +ubv_proyectos: + resource: "@UBVProyectosBundle/Controller/" + type: annotation + prefix: / + ubv_sur_ubv_estado_civil: resource: "@UBVSurUbvBundle/Controller/EstadoCivilController.php" type: annotation diff --git a/src/UBV/ProyectosBundle/Controller/DefaultController.php b/src/UBV/ProyectosBundle/Controller/DefaultController.php new file mode 100644 index 0000000..c0eb691 --- /dev/null +++ b/src/UBV/ProyectosBundle/Controller/DefaultController.php @@ -0,0 +1,17 @@ +render('UBVProyectosBundle:Default:index.html.twig'); + } +} diff --git a/src/UBV/ProyectosBundle/DependencyInjection/Configuration.php b/src/UBV/ProyectosBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000..ca73ec2 --- /dev/null +++ b/src/UBV/ProyectosBundle/DependencyInjection/Configuration.php @@ -0,0 +1,29 @@ +root('ubv_proyectos'); + + // 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/src/UBV/ProyectosBundle/DependencyInjection/UBVProyectosExtension.php b/src/UBV/ProyectosBundle/DependencyInjection/UBVProyectosExtension.php new file mode 100644 index 0000000..2ad35b1 --- /dev/null +++ b/src/UBV/ProyectosBundle/DependencyInjection/UBVProyectosExtension.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/src/UBV/ProyectosBundle/Resources/config/services.yml b/src/UBV/ProyectosBundle/Resources/config/services.yml new file mode 100644 index 0000000..b8245fa --- /dev/null +++ b/src/UBV/ProyectosBundle/Resources/config/services.yml @@ -0,0 +1,4 @@ +services: +# ubv_proyectos.example: +# class: UBV\ProyectosBundle\Example +# arguments: ["@service_id", "plain_value", "%parameter%"] diff --git a/src/UBV/ProyectosBundle/Resources/views/Default/index.html.twig b/src/UBV/ProyectosBundle/Resources/views/Default/index.html.twig new file mode 100644 index 0000000..980a0d5 --- /dev/null +++ b/src/UBV/ProyectosBundle/Resources/views/Default/index.html.twig @@ -0,0 +1 @@ +Hello World! diff --git a/src/UBV/ProyectosBundle/Tests/Controller/DefaultControllerTest.php b/src/UBV/ProyectosBundle/Tests/Controller/DefaultControllerTest.php new file mode 100644 index 0000000..7ff7cd1 --- /dev/null +++ b/src/UBV/ProyectosBundle/Tests/Controller/DefaultControllerTest.php @@ -0,0 +1,17 @@ +request('GET', '/'); + + $this->assertContains('Hello World', $client->getResponse()->getContent()); + } +} diff --git a/src/UBV/ProyectosBundle/UBVProyectosBundle.php b/src/UBV/ProyectosBundle/UBVProyectosBundle.php new file mode 100644 index 0000000..50ff5d4 --- /dev/null +++ b/src/UBV/ProyectosBundle/UBVProyectosBundle.php @@ -0,0 +1,9 @@ +