From e640e715bb636005fef0e40a4dabe5526d1646c4 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Thu, 19 Mar 2026 10:06:30 +0100 Subject: [PATCH] feat : add ZimbraConfiguration entity for CalDAV settings Co-Authored-By: Claude Sonnet 4.6 --- src/Entity/ZimbraConfiguration.php | 104 ++++++++++++++++++ .../ZimbraConfigurationRepository.php | 26 +++++ 2 files changed, 130 insertions(+) create mode 100644 src/Entity/ZimbraConfiguration.php create mode 100644 src/Repository/ZimbraConfigurationRepository.php diff --git a/src/Entity/ZimbraConfiguration.php b/src/Entity/ZimbraConfiguration.php new file mode 100644 index 0000000..d867920 --- /dev/null +++ b/src/Entity/ZimbraConfiguration.php @@ -0,0 +1,104 @@ +id; + } + + public function getServerUrl(): ?string + { + return $this->serverUrl; + } + + public function setServerUrl(?string $serverUrl): static + { + $this->serverUrl = $serverUrl; + + return $this; + } + + public function getUsername(): ?string + { + return $this->username; + } + + public function setUsername(?string $username): static + { + $this->username = $username; + + return $this; + } + + public function getEncryptedPassword(): ?string + { + return $this->encryptedPassword; + } + + public function setEncryptedPassword(?string $encryptedPassword): static + { + $this->encryptedPassword = $encryptedPassword; + + return $this; + } + + public function getCalendarPath(): ?string + { + return $this->calendarPath; + } + + public function setCalendarPath(?string $calendarPath): static + { + $this->calendarPath = $calendarPath; + + return $this; + } + + public function isEnabled(): bool + { + return $this->enabled; + } + + public function setEnabled(bool $enabled): static + { + $this->enabled = $enabled; + + return $this; + } + + public function hasPassword(): bool + { + return null !== $this->encryptedPassword; + } +} diff --git a/src/Repository/ZimbraConfigurationRepository.php b/src/Repository/ZimbraConfigurationRepository.php new file mode 100644 index 0000000..24a9b6c --- /dev/null +++ b/src/Repository/ZimbraConfigurationRepository.php @@ -0,0 +1,26 @@ +createQueryBuilder('z') + ->setMaxResults(1) + ->getQuery() + ->getOneOrNullResult() + ; + } +}