what the fuck
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m55s

This commit is contained in:
boris committed 2025-11-27 20:03:12 +00:00
1 parent f15d9a9cfd
commit 054e970df9
36 files changed
+1434 -363

No files matched your search

+12
View File
@@ -6,19 +6,31 @@ use App\Entity\Setting;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* SettingRepository provides helper accessors for app configuration storage.
*/
class SettingRepository extends ServiceEntityRepository
{
/**
* Injects the Doctrine registry reference.
*/
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Setting::class);
}
/**
* Returns a setting value falling back to the supplied default.
*/
public function getValue(string $name, ?string $default = null): ?string
{
$setting = $this->findOneBy(['name' => $name]);
return $setting?->getValue() ?? $default;
}
/**
* Persists the supplied configuration value.
*/
public function setValue(string $name, ?string $value): void
{
$em = $this->getEntityManager();