Jacek Kowalski
2026-03-19 ca616aa9c2b595f61aceb26b60584c53016d0949
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);