user === null) { $userSession = Server::get(IUserSession::class); $this->user = $userSession->getUser(); if ($this->user === null) { throw new NotFoundException('User not found'); } } return $this->user; } /** * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ private function getDeclarativeManager(): IDeclarativeManager { if ($this->manager === null) { $this->manager = Server::get(IDeclarativeManager::class); } $this->manager->loadSchemas(); return $this->manager; } /** * @throws NotAdminException * @throws NotFoundExceptionInterface * @throws NotFoundException * @throws ContainerExceptionInterface */ public function setValue(mixed $value): void { $this->getDeclarativeManager()->setValue( $this->getUser(), $this->appName, $this->form->getId(), $this->id, $value, ); } /** * @throws NotAdminException * @throws NotFoundExceptionInterface * @throws NotFoundException * @throws ContainerExceptionInterface */ public function getValue(): mixed { return $this->getDeclarativeManager()->getValue( $this->getUser(), $this->appName, $this->form->getId(), $this->id, ); } /** * @throws NotAdminException * @throws NotFoundExceptionInterface * @throws NotFoundException * @throws ContainerExceptionInterface */ public function deleteValue(): void { $this->getDeclarativeManager()->deleteValue( $this->getUser(), $this->appName, $this->form->getId(), $this->id, ); } }