backports murph-skeleton
This commit is contained in:
parent
bad69cefc2
commit
e6e8079dc0
|
@ -11,6 +11,7 @@ use App\Core\Factory\Site\NodeFactory;
|
||||||
use App\Core\Manager\EntityManager;
|
use App\Core\Manager\EntityManager;
|
||||||
use App\Core\Repository\Site\NodeRepository;
|
use App\Core\Repository\Site\NodeRepository;
|
||||||
use App\Core\Slugify\CodeSlugify;
|
use App\Core\Slugify\CodeSlugify;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class MenuEventSubscriber.
|
* class MenuEventSubscriber.
|
||||||
|
@ -24,19 +25,22 @@ class MenuEventSubscriber extends EntityManagerEventSubscriber
|
||||||
protected EntityManager $entityManager;
|
protected EntityManager $entityManager;
|
||||||
protected CodeSlugify $slugify;
|
protected CodeSlugify $slugify;
|
||||||
protected SymfonyCacheManager $cacheManager;
|
protected SymfonyCacheManager $cacheManager;
|
||||||
|
protected TranslatorInterface $translation;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
NodeFactory $nodeFactory,
|
NodeFactory $nodeFactory,
|
||||||
NodeRepository $nodeRepository,
|
NodeRepository $nodeRepository,
|
||||||
EntityManager $entityManager,
|
EntityManager $entityManager,
|
||||||
CodeSlugify $slugify,
|
CodeSlugify $slugify,
|
||||||
SymfonyCacheManager $cacheManager
|
SymfonyCacheManager $cacheManager,
|
||||||
|
TranslatorInterface $translator
|
||||||
) {
|
) {
|
||||||
$this->nodeFactory = $nodeFactory;
|
$this->nodeFactory = $nodeFactory;
|
||||||
$this->nodeRepository = $nodeRepository;
|
$this->nodeRepository = $nodeRepository;
|
||||||
$this->entityManager = $entityManager;
|
$this->entityManager = $entityManager;
|
||||||
$this->slugify = $slugify;
|
$this->slugify = $slugify;
|
||||||
$this->cacheManager = $cacheManager;
|
$this->cacheManager = $cacheManager;
|
||||||
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function support(EntityInterface $entity)
|
public function support(EntityInterface $entity)
|
||||||
|
@ -75,7 +79,7 @@ class MenuEventSubscriber extends EntityManagerEventSubscriber
|
||||||
$childNode = $this->nodeFactory->create($menu, '/');
|
$childNode = $this->nodeFactory->create($menu, '/');
|
||||||
$childNode
|
$childNode
|
||||||
->setParent($rootNode)
|
->setParent($rootNode)
|
||||||
->setLabel('Premier élément')
|
->setLabel($this->translator->trans('First element'))
|
||||||
;
|
;
|
||||||
|
|
||||||
$menu->setRootNode($rootNode);
|
$menu->setRootNode($rootNode);
|
||||||
|
|
|
@ -213,3 +213,4 @@
|
||||||
"Enable": "Activer"
|
"Enable": "Activer"
|
||||||
"Disable": "Désactiver"
|
"Disable": "Désactiver"
|
||||||
"Reuse the query string": "Réutiliser la chaîne de requête"
|
"Reuse the query string": "Réutiliser la chaîne de requête"
|
||||||
|
"First element": "Premier élément"
|
||||||
|
|
|
@ -1,14 +1,4 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
<link rel="shortcut icon" href="{{ asset(site_logo) }}">
|
||||||
<link rel="icon" href="{{ asset('favicon.png') }} " type="image/png">
|
<link rel="icon" href="{{ asset(site_logo) }}">
|
||||||
<link rel="icon" sizes="32x32" href="{{ asset('favicon-32.png') }}" type="image/png">
|
|
||||||
<link rel="icon" sizes="64x64" href="{{ asset('favicon-64.png') }}" type="image/png">
|
|
||||||
<link rel="icon" sizes="96x96" href="{{ asset('favicon-96.png') }}" type="image/png">
|
|
||||||
<link rel="icon" sizes="196x196" href="{{ asset('favicon-196.png') }}" type="image/png">
|
|
||||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('apple-touch-icon.png') }}">
|
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="{{ asset('apple-touch-icon-60x60.png') }}">
|
|
||||||
<link rel="apple-touch-icon" sizes="76x76" href="{{ asset('apple-touch-icon-76x76.png') }}">
|
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="{{ asset('apple-touch-icon-114x114.png') }}">
|
|
||||||
<link rel="apple-touch-icon" sizes="120x120" href="{{ asset('apple-touch-icon-120x120.png') }}">
|
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('apple-touch-icon-144x144.png') }}">
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-lg-6 col-md-12">
|
||||||
<div class="pl-md-3">
|
<div class="pl-md-3">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for path, views in pathViews %}
|
{% for path, views in pathViews %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-nowrap">{{ path }}</td>
|
<td class="wrap">{{ path }}</td>
|
||||||
<td class="text-right">{{ views.views }}</td>
|
<td class="text-right">{{ views.views }}</td>
|
||||||
<td class="text-right">{{ views.desktopViews }}</td>
|
<td class="text-right">{{ views.desktopViews }}</td>
|
||||||
<td class="text-right">{{ views.mobileViews }}</td>
|
<td class="text-right">{{ views.mobileViews }}</td>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-lg-6 col-md-12">
|
||||||
<div class="pl-md-3">
|
<div class="pl-md-3">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
Loading…
Reference in a new issue