Skip to content

Commit

Permalink
Add standard view
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnuk committed Dec 15, 2013
1 parent ede6cf9 commit 45b5865
Show file tree
Hide file tree
Showing 10 changed files with 601 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/AppKernel.php
Expand Up @@ -18,6 +18,7 @@ public function registerBundles()
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Univ\Savoie\EdtBundle\UnivSavoieEdtBundle(),
new Crous\Grenoble\MenuBundle\CrousGrenobleMenuBundle(),
new Etudiant\AgendaBundle\EtudiantAgendaBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
5 changes: 5 additions & 0 deletions app/config/routing.yml
@@ -1,3 +1,8 @@
etudiant_agenda:
resource: "@EtudiantAgendaBundle/Controller/"
type: annotation
prefix: /

crous_grenoble_menu:
resource: "@CrousGrenobleMenuBundle/Controller/"
type: annotation
Expand Down
29 changes: 29 additions & 0 deletions src/Etudiant/AgendaBundle/Controller/DefaultController.php
@@ -0,0 +1,29 @@
<?php

namespace Etudiant\AgendaBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class DefaultController extends Controller
{
/**
* @Route("/", name="agenda_index")
* @Route("/home")
* @Template()
*/
public function indexAction()
{
return array();
}

/**
* @Route("/edt", name="agenda_edt")
* @Template()
*/
public function edtAction()
{
return array();
}
}
29 changes: 29 additions & 0 deletions src/Etudiant/AgendaBundle/DependencyInjection/Configuration.php
@@ -0,0 +1,29 @@
<?php

namespace Etudiant\AgendaBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('etudiant_agenda');

// 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;
}
}
@@ -0,0 +1,28 @@
<?php

namespace Etudiant\AgendaBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;

/**
* This is the class that loads and manages your bundle configuration
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
*/
class EtudiantAgendaExtension extends Extension
{
/**
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
}
}
9 changes: 9 additions & 0 deletions src/Etudiant/AgendaBundle/EtudiantAgendaBundle.php
@@ -0,0 +1,9 @@
<?php

namespace Etudiant\AgendaBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class EtudiantAgendaBundle extends Bundle
{
}
20 changes: 20 additions & 0 deletions src/Etudiant/AgendaBundle/Resources/config/services.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<!--
<parameters>
<parameter key="etudiant_agenda.example.class">Etudiant\AgendaBundle\Example</parameter>
</parameters>
<services>
<service id="etudiant_agenda.example" class="%etudiant_agenda.example.class%">
<argument type="service" id="service_id" />
<argument>plain_value</argument>
<argument>%parameter_name%</argument>
</service>
</services>
-->
</container>

0 comments on commit 45b5865

Please sign in to comment.