fix: Generalized import cal events not from source storages
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user