Changed Config Variables database and other entities.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use App\Entity\ConfigVariable;
|
||||
use App\Repository\ConfigVariableRepository;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
* Service to manage config variables.
|
||||
*/
|
||||
class ConfigVariableService
|
||||
{
|
||||
|
||||
public function __construct(
|
||||
private ConfigVariableRepository $repoVariables
|
||||
) {}
|
||||
|
||||
public function getVariable(string $key) {
|
||||
$var = $this->repoVariables->findVariableByKey($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and init all variables.
|
||||
* To be used during Setup process.
|
||||
*/
|
||||
public function InitVariablesOnSetup(): void {
|
||||
|
||||
$entityManager = $this->repoVariables->getEntityManager();
|
||||
$entityManager->beginTransaction();
|
||||
|
||||
try {
|
||||
|
||||
}
|
||||
catch (\Throwable $th) {
|
||||
$entityManager->rollback();
|
||||
throw $th;
|
||||
}
|
||||
}
|
||||
|
||||
private function AddConfigVariable(string $key, string $value, string $section) : Returntype {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user