1: <?php
2: /**
3: * This code is licensed under AGPLv3 license or AfterLogic Software License
4: * if commercial version of the product was purchased.
5: * For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files.
6: */
7:
8: namespace Aurora\Modules\S3CorporateFilestorage;
9:
10: use Aurora\Modules\CorporateFiles\Module as CorporateFiles;
11:
12: /**
13: * @license https://www.gnu.org/licenses/agpl-3.0.html AGPL-3.0
14: * @license https://afterlogic.com/products/common-licensing AfterLogic Software License
15: * @copyright Copyright (c) 2023, Afterlogic Corp.
16: *
17: * @property Settings $oModuleSettings
18: *
19: * @package Modules
20: */
21: class Module extends \Aurora\Modules\S3Filestorage\Module
22: {
23: protected $aRequireModules = ['CorporateFiles', 'S3Filestorage'];
24:
25: protected static $sStorageType = 'corporate';
26: protected static $iStorageOrder = 20;
27:
28: public function init()
29: {
30: $corporateFiles = CorporateFiles::getInstance();
31: if ($corporateFiles && !$this->oModuleSettings->Disabled) {
32: $corporateFiles->setConfig('Disabled', true);
33: }
34:
35: parent::init();
36: }
37:
38: /**
39: * @return Module
40: */
41: public static function getInstance()
42: {
43: return parent::getInstance();
44: }
45:
46: /**
47: * @return Module
48: */
49: public static function Decorator()
50: {
51: return parent::Decorator();
52: }
53:
54: /**
55: * @return Settings
56: */
57: public function getModuleSettings()
58: {
59: return $this->oModuleSettings;
60: }
61: }
62: