Commit b4fc0c63 authored by Mat's avatar Mat

Exercice: Création d'un nouveau AssoBundle

parent eff46c93
......@@ -17,6 +17,7 @@ class AppKernel extends Kernel
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new TechnoBundle\TechnoBundle(),
new AssoBundle\AssoBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
......@@ -3,6 +3,7 @@ imports:
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@TechnoBundle/Resources/config/services.yml" }
- { resource: "@AssoBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
......
asso:
resource: "@AssoBundle/Resources/config/routing.yml"
prefix: /asso
techno:
resource: "@TechnoBundle/Resources/config/routing.yml"
prefix: /techno
......@@ -4,7 +4,8 @@
"type": "project",
"autoload": {
"psr-4": {
"TechnoBundle\\": "src/TechnoBundle"
"TechnoBundle\\": "src/TechnoBundle",
"AssoBundle\\": "src/AssoBundle"
},
"classmap": [
"app/AppKernel.php",
......
<?php
namespace AssoBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AssoBundle extends Bundle
{
}
<?php
namespace AssoBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class AssoController extends Controller
{
public function indexAction()
{
return $this->render('@Asso/Asso/index.html.twig');
}
}
asso_homepage:
path: /
defaults:
_controller: AssoBundle:Asso:index
services:
# asso.example:
# class: AssoBundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]
{% extends "base.html.twig" %}
{% block body %}
<h2>Hello World!</h2>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment