prepare the core to be override
This commit is contained in:
parent
c8156eb709
commit
e93a63f9e9
|
@ -18,4 +18,5 @@ return [
|
||||||
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
|
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
|
||||||
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
|
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
|
||||||
App\Core\Bundle\CoreBundle::class => ['all' => true],
|
App\Core\Bundle\CoreBundle::class => ['all' => true],
|
||||||
|
App\Bundle\AppBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,4 +2,5 @@ twig:
|
||||||
default_path: '%kernel.project_dir%/templates'
|
default_path: '%kernel.project_dir%/templates'
|
||||||
form_themes: ['@Core/form/bootstrap_4_form_theme.html.twig']
|
form_themes: ['@Core/form/bootstrap_4_form_theme.html.twig']
|
||||||
paths:
|
paths:
|
||||||
|
'%kernel.project_dir%/templates/core/': Core
|
||||||
'%kernel.project_dir%/core/Resources/views/': Core
|
'%kernel.project_dir%/core/Resources/views/': Core
|
||||||
|
|
|
@ -16,7 +16,7 @@ class DashboardAdminController extends AdminController
|
||||||
*/
|
*/
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
return $this->render('@Core/dashboard/admin/index.html.twig', [
|
return $this->render('@Core/dashboard/index.html.twig', [
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,8 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="ml-auto">
|
<div class="ml-auto">
|
||||||
<div class="collapse navbar-collapse" id="navigation">
|
|
||||||
{{ include('@Core/admin/module/account.html.twig') }}
|
{{ include('@Core/admin/module/account.html.twig') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Afficher navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{% block body_container %}
|
{% block body_container %}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div>
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-light dropdown-toggle dropdown-toggle-hide-after" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-light dropdown-toggle dropdown-toggle-hide-after" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<span class="fa fa-cog"></span>
|
{{ app.user }}
|
||||||
|
<span class="ml-1 fa fa-cog"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu dropdown-menu-lg-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a href="{{ path('admin_account') }}" class="dropdown-item">
|
<a href="{{ path('admin_account') }}" class="dropdown-item">
|
||||||
Mon compte
|
Mon compte
|
||||||
</a>
|
</a>
|
||||||
|
@ -13,4 +13,3 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{% extends '@Core/admin/layout.html.twig' %}
|
|
23
src/Bundle/AppBundle.php
Normal file
23
src/Bundle/AppBundle.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Twig.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Bundle;
|
||||||
|
|
||||||
|
use App\DependencyInjection\AppExtension;
|
||||||
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||||
|
|
||||||
|
class AppBundle extends Bundle
|
||||||
|
{
|
||||||
|
public function getContainerExtension()
|
||||||
|
{
|
||||||
|
return new AppExtension();
|
||||||
|
}
|
||||||
|
}
|
28
src/DependencyInjection/AppExtension.php
Normal file
28
src/DependencyInjection/AppExtension.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DependencyInjection;
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\DependencyInjection\Extension\Extension;
|
||||||
|
|
||||||
|
class AppExtension extends Extension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function load(array $configs, ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
$configuration = $this->getConfiguration($configs, $container);
|
||||||
|
$config = $this->processConfiguration($configuration, $configs);
|
||||||
|
|
||||||
|
$container->setParameter('app', $config);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getConfiguration(array $configs, ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
return new Configuration();
|
||||||
|
}
|
||||||
|
}
|
16
src/DependencyInjection/Configuration.php
Normal file
16
src/DependencyInjection/Configuration.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DependencyInjection;
|
||||||
|
|
||||||
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||||
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||||
|
|
||||||
|
class Configuration implements ConfigurationInterface
|
||||||
|
{
|
||||||
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
|
{
|
||||||
|
$treeBuilder = new TreeBuilder('app');
|
||||||
|
|
||||||
|
return $treeBuilder;
|
||||||
|
}
|
||||||
|
}
|
13
templates/core/dashboard/index.html.twig
Normal file
13
templates/core/dashboard/index.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{% extends '@Core/admin/layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="mr-auto w-50">
|
||||||
|
<h1 class="display-5">
|
||||||
|
Tableau de bord
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Reference in a new issue