Changed Config Variables database and other entities.

This commit is contained in:
2024-09-09 12:11:24 +02:00
parent 8c6a70b0be
commit 82bd51e6f0
7 changed files with 135 additions and 23 deletions
+46
View File
@@ -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 {
}
}