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\OfficeDocumentEditor;
9:
10: use Aurora\System\SettingsProperty;
11:
12: /**
13: * @property bool $Disabled
14: * @property bool $IncludeInMobile
15: * @property array $ExtensionsToView
16: * @property array $ExtensionsToConvert
17: * @property array $ExtensionsToEdit
18: * @property string $DocumentServerUrl
19: * @property string $Secret
20: * @property bool $EnableHistory
21: * @property string $TrustedServerHost
22: */
23:
24: class Settings extends \Aurora\System\Module\Settings
25: {
26: protected function initDefaults()
27: {
28: $this->aContainer = [
29: "Disabled" => new SettingsProperty(
30: false,
31: "bool",
32: null,
33: "Setting to true disables the module",
34: ),
35: "IncludeInMobile" => new SettingsProperty(
36: true,
37: "bool",
38: null,
39: "If true, the module is used in mobile version of the interface",
40: ),
41: "ExtensionsToView" => new SettingsProperty(
42: [
43: "pdf",
44: "rtf",
45: "csv",
46: "txt",
47: "html",
48: "htm",
49: "mht",
50: "djvu",
51: "fb2",
52: "epub",
53: "xps"
54: ],
55: "array",
56: null,
57: "List of file types which can only be viewed by OnlyOffice",
58: ),
59: "ExtensionsToConvert" => new SettingsProperty(
60: [
61: "doc" => "docx",
62: "xls" => "xlsx",
63: "pps" => "pptx",
64: "ppt" => "pptx",
65: "odt" => "docx",
66: "odp" => "pptx",
67: "ods" => "xlsx",
68: "xlt" => "xlsx",
69: "fods" => "xlsx",
70: "ots" => "xlsx",
71: "ott" => "docx",
72: "fodt" => "docx",
73: "dot" => "docx",
74: "otp" => "pptx",
75: "fodp" => "pptx",
76: "pot" => "pptx",
77: "docm" => "docx",
78: "dotx" => "docx",
79: "dotm" => "docx",
80: "xltx" => "xlsx",
81: "xltm" => "xlsx",
82: "xlsm" => "xlsx",
83: "potx" => "pptx",
84: "potm" => "pptx",
85: "pptm" => "pptx",
86: "ppsx" => "pptx",
87: "ppsm" => "pptx"
88: ],
89: "array",
90: null,
91: "List of file types which can only be edited by OnlyOffice into a different format, and target format specified for each entry",
92: ),
93: "ExtensionsToEdit" => new SettingsProperty(
94: [
95: "docx",
96: "xlsx",
97: "pptx"
98: ],
99: "array",
100: null,
101: "List of file types which can be edited by OnlyOffice",
102: ),
103: "DocumentServerUrl" => new SettingsProperty(
104: "",
105: "string",
106: null,
107: "OnlyOffice installation URL",
108: ),
109: "Secret" => new SettingsProperty(
110: "",
111: "string",
112: null,
113: "Secret token needs to be specified here if JWT protection is enabled on OnlyOffice",
114: ),
115: "EnableHistory" => new SettingsProperty(
116: true,
117: "bool",
118: null,
119: "Enables Version History feature of document editing",
120: ),
121: "TrustedServerHost" => new SettingsProperty(
122: "",
123: "string",
124: null,
125: "Reserved for future use",
126: ),
127: ];
128: }
129: }
130: