Commit 7922daf7 authored by dj3c1t's avatar dj3c1t

import initial

parents
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Account;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class AlbumController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Account:Album/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Account;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class AuthorController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Account:Author/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Account;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class SourceController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Account:Source/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Account;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class TrackController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Account:Track/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Source;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class AlbumController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Source:Album/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Source;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class AuthorController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Source:Author/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Source;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class SourceController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Source:Source/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\Controller\Source;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class TrackController extends Controller {
public function indexAction() {
return $this->render(
'Dj3c1tSourceMLBundle:Source:Track/index.html.twig',
array(
)
);
}
}
<?php
namespace Dj3c1t\SourceMLBundle\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('dj3c1t_source_ml');
// 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;
}
}
<?php
namespace Dj3c1t\SourceMLBundle\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 Dj3c1tSourceMLExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
}
<?php
namespace Dj3c1t\SourceMLBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class Dj3c1tSourceMLBundle extends Bundle
{
}
dj3c1t_menus:
sourceml:
account:
routes:
- account_authors
- account_albums
- account_tracks
- account_sources
items:
authors:
route: account_authors
label: Auteurs
glyphicon: glyphicon-edit
albums:
route: account_albums
label: Albums
glyphicon: glyphicon-edit
tracks:
route: account_tracks
label: Morceaux
glyphicon: glyphicon-edit
sources:
route: account_sources
label: Sources
glyphicon: glyphicon-edit
sources:
routes:
- authors
- albums
- tracks
- sources
items:
authors:
route: authors
label: Auteurs
glyphicon: glyphicon-triangle-right
albums:
route: albums
label: Albums
glyphicon: glyphicon-triangle-right
tracks:
route: tracks
label: Morceaux
glyphicon: glyphicon-triangle-right
sources:
route: sources
label: Sources
glyphicon: glyphicon-triangle-right
account_authors:
path: /account/authors
defaults: { _controller: Dj3c1tSourceMLBundle:Account/Author:index }
account_albums:
path: /account/albums
defaults: { _controller: Dj3c1tSourceMLBundle:Account/Album:index }
account_tracks:
path: /account/tracks
defaults: { _controller: Dj3c1tSourceMLBundle:Account/Track:index }
account_sources:
path: /account/sources
defaults: { _controller: Dj3c1tSourceMLBundle:Account/Source:index }
authors:
path: /authors
defaults: { _controller: Dj3c1tSourceMLBundle:Source/Author:index }
albums:
path: /albums
defaults: { _controller: Dj3c1tSourceMLBundle:Source/Album:index }
tracks:
path: /tracks
defaults: { _controller: Dj3c1tSourceMLBundle:Source/Track:index }
sources:
path: /sources
defaults: { _controller: Dj3c1tSourceMLBundle:Source/Source:index }
services:
# dj3c1t_source_ml.example:
# class: Dj3c1t\SourceMLBundle\Example
# arguments: [@service_id, "plain_value", %parameter%]
{% extends '::base.html.twig' %}
{% block main %}
<section id="account_albums">
<header>
<h1>Albums</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="account_authors">
<header>
<h1>Auteurs</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="account_sources">
<header>
<h1>Sources</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="account_tracks">
<header>
<h1>Morceaux</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="albums">
<header>
<h1>Albums</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="authors">
<header>
<h1>Auteurs</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="sources">
<header>
<h1>Sources</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
{% extends '::base.html.twig' %}
{% block main %}
<section id="tracks">
<header>
<h1>Morceaux</h1>
</header>
<div class="main">
</div>
</section>
{% endblock %}
<?php
namespace Dj3c1t\SourceMLBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase {
public function testIndex() {
$this->assertTrue(true);
}
}
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