From 148d376f573020cfc0ff52c96082136d6d65824a Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Tue, 17 Feb 2026 17:48:09 +0000
Subject: [PATCH] Release version 4.1
---
src/UcrmHelper.php | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/UcrmHelper.php b/src/UcrmHelper.php
index 93fb323..d5f2eeb 100644
--- a/src/UcrmHelper.php
+++ b/src/UcrmHelper.php
@@ -2,6 +2,8 @@
namespace SIPL\UCRM\wFirma;
+use Ubnt\UcrmPluginSdk\Service\UcrmOptionsManager;
+
class UcrmHelper {
protected string $rootDirectory;
protected ?\Ubnt\UcrmPluginSdk\Service\UcrmApi $api = NULL;
@@ -28,6 +30,12 @@
return $this->api;
}
+ function getSelfUrl(): string {
+ $ucrmOptionsManager = new UcrmOptionsManager($this->rootDirectory);
+ $options = $ucrmOptionsManager->loadOptions();
+ return $options->ucrmLocalUrl ?? $options->ucrmPublicUrl ?? '';
+ }
+
function getAttributes(): UcrmAttributes {
if ($this->attributes === NULL) {
$this->attributes = new UcrmAttributes($this);
--
Gitblit v1.10.0