modification style (fixes #33143)

This commit is contained in:
afornerot 2021-10-18 13:37:10 +02:00
parent eedaa86dcf
commit 6a8e102fc6
3 changed files with 17 additions and 3 deletions

View File

@ -13,12 +13,15 @@
class sessionListener {
protected $container;
protected $em;
protected $token_storage;
protected $session;
public function __construct($container, EntityManager $em, TokenStorageInterface $token_storage)
public function __construct($container, EntityManager $em, TokenStorageInterface $token_storage,Session $session)
{
$this->container = $container;
$this->em = $em;
$this->token_storage = $token_storage;
$this->session = $session;
}
public function haveRole($curentuser,$roles,$tohave,$route) {
@ -44,7 +47,7 @@
}
public function onDomainParse(Event $event) {
$session = new Session();
$session = $this->session;
$configs = $this->em->getRepository("CadolesCoreBundle:Config")->findAll();
foreach($configs as $config) {

View File

@ -26,7 +26,7 @@ services:
cadoles.core.session.listener:
public: true
class: Cadoles\CoreBundle\EventListener\sessionListener
arguments: ['@service_container','@doctrine.orm.entity_manager',"@security.token_storage"]
arguments: ['@service_container','@doctrine.orm.entity_manager',"@security.token_storage","@session"]
tags:
- { name: kernel.event_listener, event: kernel.request, method: onDomainParse }

View File

@ -60,6 +60,17 @@ body {
height: 20px;
}
@media (max-width: 991px) {
.header .title{
font-size: 30px;
}
.header small {
font-size:14px;
top: 25px;
}
}
@media (max-width: 767px) {
.header { display: none }
#menu-header { display: none }