Browse Source

Ajout de la structure du bindle favorite.

bastien 12 years ago
parent
commit
86b3cdae9a

+ 1 - 0
app/AppKernel.php View File

@@ -31,6 +31,7 @@ class AppKernel extends Kernel
31 31
             new Muzich\MynetworkBundle\MuzichMynetworkBundle(),
32 32
             new Muzich\AdminBundle\MuzichAdminBundle(),
33 33
             new Muzich\GroupBundle\MuzichGroupBundle(),
34
+            new Muzich\FavoriteBundle\MuzichFavoriteBundle(),
34 35
         );
35 36
 
36 37
         if (in_array($this->getEnvironment(), array('dev', 'test'))) {

+ 17 - 0
src/Muzich/FavoriteBundle/Controller/FavoriteController.php View File

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+namespace Muzich\FavoriteBundle\Controller;
4
+
5
+use Muzich\CoreBundle\lib\Controller;
6
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
7
+//use Muzich\CoreBundle\Entity\Group;
8
+//use Muzich\CoreBundle\Form\Group\GroupForm;
9
+//use Symfony\Component\HttpFoundation\Request;
10
+//use Muzich\CoreBundle\Managers\GroupManager;
11
+
12
+class FavoriteController extends Controller
13
+{
14
+  
15
+  
16
+  
17
+}

+ 29 - 0
src/Muzich/FavoriteBundle/DependencyInjection/Configuration.php View File

@@ -0,0 +1,29 @@
1
+<?php
2
+
3
+namespace Muzich\FavoriteBundle\DependencyInjection;
4
+
5
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
+use Symfony\Component\Config\Definition\ConfigurationInterface;
7
+
8
+/**
9
+ * This is the class that validates and merges configuration from your app/config files
10
+ *
11
+ * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12
+ */
13
+class Configuration implements ConfigurationInterface
14
+{
15
+    /**
16
+     * {@inheritDoc}
17
+     */
18
+    public function getConfigTreeBuilder()
19
+    {
20
+        $treeBuilder = new TreeBuilder();
21
+        $rootNode = $treeBuilder->root('muzich_favorite');
22
+
23
+        // Here you should define the parameters that are allowed to
24
+        // configure your bundle. See the documentation linked above for
25
+        // more information on that topic.
26
+
27
+        return $treeBuilder;
28
+    }
29
+}

+ 28 - 0
src/Muzich/FavoriteBundle/DependencyInjection/MuzichFavoriteExtension.php View File

@@ -0,0 +1,28 @@
1
+<?php
2
+
3
+namespace Muzich\FavoriteBundle\DependencyInjection;
4
+
5
+use Symfony\Component\DependencyInjection\ContainerBuilder;
6
+use Symfony\Component\Config\FileLocator;
7
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8
+use Symfony\Component\DependencyInjection\Loader;
9
+
10
+/**
11
+ * This is the class that loads and manages your bundle configuration
12
+ *
13
+ * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
14
+ */
15
+class MuzichFavoriteExtension extends Extension
16
+{
17
+    /**
18
+     * {@inheritDoc}
19
+     */
20
+    public function load(array $configs, ContainerBuilder $container)
21
+    {
22
+        $configuration = new Configuration();
23
+        $config = $this->processConfiguration($configuration, $configs);
24
+
25
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26
+        $loader->load('services.yml');
27
+    }
28
+}

+ 9 - 0
src/Muzich/FavoriteBundle/MuzichFavoriteBundle.php View File

@@ -0,0 +1,9 @@
1
+<?php
2
+
3
+namespace Muzich\FavoriteBundle;
4
+
5
+use Symfony\Component\HttpKernel\Bundle\Bundle;
6
+
7
+class MuzichFavoriteBundle extends Bundle
8
+{
9
+}

+ 2 - 0
src/Muzich/FavoriteBundle/Resources/config/routing.yml View File

@@ -0,0 +1,2 @@
1
+
2
+

+ 7 - 0
src/Muzich/FavoriteBundle/Resources/config/services.yml View File

@@ -0,0 +1,7 @@
1
+parameters:
2
+#    muzich_favorite.example.class: Muzich\FavoriteBundle\Example
3
+
4
+services:
5
+#    muzich_favorite.example:
6
+#        class: %muzich_favorite.example.class%
7
+#        arguments: [@service_id, "plain_value", %parameter%]

+ 0 - 0
src/Muzich/FavoriteBundle/Resources/doc/index.rst View File


+ 13 - 0
src/Muzich/FavoriteBundle/Resources/views/layout.html.twig View File

@@ -0,0 +1,13 @@
1
+{% extends 'MuzichCoreBundle::layout.html.twig' %}
2
+
3
+{% block css %}
4
+	<link href="{{ asset('bundles/muzichfavorite/css/favorite.css') }}" rel="stylesheet" media="screen" type="text/css" />
5
+{% endblock %}
6
+
7
+{% block main_content %}
8
+  
9
+  {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with { 'active': '', 'mygroups': false } %}
10
+  
11
+  {% block content %}{% endblock %}
12
+  
13
+{% endblock %}