Add config and controller to use the config

This commit is contained in:
Tim
2020-07-27 00:26:57 +02:00
parent a2c17d4be3
commit db970b4c69
6 changed files with 115 additions and 5 deletions

View File

@ -13,16 +13,20 @@ class ParameterService
/** @var ParameterBagInterface */
private $parameter;
private $config;
/**
* ParameterService constructor.
*
* @param EntityManagerInterface $em
* @param ParameterBagInterface $parameter
* @param $config
*/
public function __construct(EntityManagerInterface $em, ParameterBagInterface $parameter)
public function __construct(EntityManagerInterface $em, ParameterBagInterface $parameter, $config)
{
$this->em = $em;
$this->parameter = $parameter;
$this->config = $config;
}
/**
@ -75,4 +79,12 @@ class ParameterService
$this->em->persist($parameter);
$this->em->flush();
}
/**
* @return array
*/
public function getConfig()
{
return $this->config;
}
}