fix: Generalized import cal events not from source storages

This commit is contained in:
Aerex
2020-09-28 23:48:55 -05:00
parent 0a01e6e905
commit 4140ded5b3
2 changed files with 19 additions and 3 deletions

View File

@@ -22,6 +22,18 @@ class StorageManager {
$this->configs = $configs;
}
public function fromStorageSource(Calendar $calendar) {
if (!isset($this->configs)) {
throw new \Exception('StorageManager was not initialize or configs are not defined');
}
foreach ($this->configs['storages'] as $storage => $value) {
if (stristr($calendar->PRODID, $storage)) {
return true;
}
}
return false;
}
public function getStorages() {
return $this->storages;
}