params['version']) ? $this->params['version'] : $params['version']; } try { // after $return = ServiceLocator::call(\ModulesGarden\Servers\KerioEmail\Core\Configuration\Addon\Update\After::class)->execute(['version' => $version]); // update if (!isset($return['version'])) { $return['version'] = $version; } $patchManager = ServiceLocator::call("patchManager")->run(/*$this->getConfig("version")*/ '', $version); // before $return = ServiceLocator::call(\ModulesGarden\Servers\KerioEmail\Core\Configuration\Addon\Update\Before::class)->execute($return); return $return; } catch (\Exception $ex) { ServiceLocator::call(\ModulesGarden\Servers\KerioEmail\Core\HandlerError\ErrorManager::class)->addError(self::class, $ex->getMessage(), $return); } } }