@@ -42,176 +42,176 @@ |
||
42 | 42 | */ |
43 | 43 | class Defaults { |
44 | 44 | |
45 | - /** |
|
46 | - * \OC_Defaults instance to retrieve the defaults |
|
47 | - * @since 6.0.0 |
|
48 | - */ |
|
49 | - private $defaults; |
|
50 | - |
|
51 | - /** |
|
52 | - * creates a \OC_Defaults instance which is used in all methods to retrieve the |
|
53 | - * actual defaults |
|
54 | - * @since 6.0.0 |
|
55 | - */ |
|
56 | - public function __construct(\OC_Defaults $defaults = null) { |
|
57 | - if ($defaults === null) { |
|
58 | - $defaults = \OC::$server->getThemingDefaults(); |
|
59 | - } |
|
60 | - $this->defaults = $defaults; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * get base URL for the organisation behind your ownCloud instance |
|
65 | - * @return string |
|
66 | - * @since 6.0.0 |
|
67 | - */ |
|
68 | - public function getBaseUrl() { |
|
69 | - return $this->defaults->getBaseUrl(); |
|
70 | - } |
|
71 | - |
|
72 | - /** |
|
73 | - * link to the desktop sync client |
|
74 | - * @return string |
|
75 | - * @since 6.0.0 |
|
76 | - */ |
|
77 | - public function getSyncClientUrl() { |
|
78 | - return $this->defaults->getSyncClientUrl(); |
|
79 | - } |
|
80 | - |
|
81 | - /** |
|
82 | - * link to the iOS client |
|
83 | - * @return string |
|
84 | - * @since 8.0.0 |
|
85 | - */ |
|
86 | - public function getiOSClientUrl() { |
|
87 | - return $this->defaults->getiOSClientUrl(); |
|
88 | - } |
|
89 | - |
|
90 | - /** |
|
91 | - * link to the Android client |
|
92 | - * @return string |
|
93 | - * @since 8.0.0 |
|
94 | - */ |
|
95 | - public function getAndroidClientUrl() { |
|
96 | - return $this->defaults->getAndroidClientUrl(); |
|
97 | - } |
|
98 | - |
|
99 | - /** |
|
100 | - * base URL to the documentation of your ownCloud instance |
|
101 | - * @return string |
|
102 | - * @since 6.0.0 |
|
103 | - */ |
|
104 | - public function getDocBaseUrl() { |
|
105 | - return $this->defaults->getDocBaseUrl(); |
|
106 | - } |
|
107 | - |
|
108 | - /** |
|
109 | - * name of your ownCloud instance |
|
110 | - * @return string |
|
111 | - * @since 6.0.0 |
|
112 | - */ |
|
113 | - public function getName() { |
|
114 | - return $this->defaults->getName(); |
|
115 | - } |
|
116 | - |
|
117 | - /** |
|
118 | - * name of your ownCloud instance containing HTML styles |
|
119 | - * @return string |
|
120 | - * @since 8.0.0 |
|
121 | - */ |
|
122 | - public function getHTMLName() { |
|
123 | - return $this->defaults->getHTMLName(); |
|
124 | - } |
|
125 | - |
|
126 | - /** |
|
127 | - * Entity behind your onwCloud instance |
|
128 | - * @return string |
|
129 | - * @since 6.0.0 |
|
130 | - */ |
|
131 | - public function getEntity() { |
|
132 | - return $this->defaults->getEntity(); |
|
133 | - } |
|
134 | - |
|
135 | - /** |
|
136 | - * ownCloud slogan |
|
137 | - * @return string |
|
138 | - * @since 6.0.0 |
|
139 | - */ |
|
140 | - public function getSlogan(?string $lang = null) { |
|
141 | - return $this->defaults->getSlogan($lang); |
|
142 | - } |
|
143 | - |
|
144 | - /** |
|
145 | - * footer, short version |
|
146 | - * @return string |
|
147 | - * @since 6.0.0 |
|
148 | - */ |
|
149 | - public function getShortFooter() { |
|
150 | - return $this->defaults->getShortFooter(); |
|
151 | - } |
|
152 | - |
|
153 | - /** |
|
154 | - * footer, long version |
|
155 | - * @return string |
|
156 | - * @since 6.0.0 |
|
157 | - */ |
|
158 | - public function getLongFooter() { |
|
159 | - return $this->defaults->getLongFooter(); |
|
160 | - } |
|
161 | - |
|
162 | - /** |
|
163 | - * Returns the AppId for the App Store for the iOS Client |
|
164 | - * @return string AppId |
|
165 | - * @since 8.0.0 |
|
166 | - */ |
|
167 | - public function getiTunesAppId() { |
|
168 | - return $this->defaults->getiTunesAppId(); |
|
169 | - } |
|
170 | - |
|
171 | - /** |
|
172 | - * Themed logo url |
|
173 | - * |
|
174 | - * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
175 | - * @return string |
|
176 | - * @since 12.0.0 |
|
177 | - */ |
|
178 | - public function getLogo($useSvg = true) { |
|
179 | - return $this->defaults->getLogo($useSvg); |
|
180 | - } |
|
181 | - |
|
182 | - /** |
|
183 | - * Returns primary color |
|
184 | - * @return string |
|
185 | - * @since 12.0.0 |
|
186 | - */ |
|
187 | - public function getColorPrimary() { |
|
188 | - return $this->defaults->getColorPrimary(); |
|
189 | - } |
|
190 | - |
|
191 | - /** |
|
192 | - * @param string $key |
|
193 | - * @return string URL to doc with key |
|
194 | - * @since 12.0.0 |
|
195 | - */ |
|
196 | - public function buildDocLinkToKey($key) { |
|
197 | - return $this->defaults->buildDocLinkToKey($key); |
|
198 | - } |
|
199 | - |
|
200 | - /** |
|
201 | - * Returns the title |
|
202 | - * @return string title |
|
203 | - * @since 12.0.0 |
|
204 | - */ |
|
205 | - public function getTitle() { |
|
206 | - return $this->defaults->getTitle(); |
|
207 | - } |
|
208 | - |
|
209 | - /** |
|
210 | - * Returns primary color |
|
211 | - * @return string |
|
212 | - * @since 13.0.0 |
|
213 | - */ |
|
214 | - public function getTextColorPrimary() { |
|
215 | - return $this->defaults->getTextColorPrimary(); |
|
216 | - } |
|
45 | + /** |
|
46 | + * \OC_Defaults instance to retrieve the defaults |
|
47 | + * @since 6.0.0 |
|
48 | + */ |
|
49 | + private $defaults; |
|
50 | + |
|
51 | + /** |
|
52 | + * creates a \OC_Defaults instance which is used in all methods to retrieve the |
|
53 | + * actual defaults |
|
54 | + * @since 6.0.0 |
|
55 | + */ |
|
56 | + public function __construct(\OC_Defaults $defaults = null) { |
|
57 | + if ($defaults === null) { |
|
58 | + $defaults = \OC::$server->getThemingDefaults(); |
|
59 | + } |
|
60 | + $this->defaults = $defaults; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * get base URL for the organisation behind your ownCloud instance |
|
65 | + * @return string |
|
66 | + * @since 6.0.0 |
|
67 | + */ |
|
68 | + public function getBaseUrl() { |
|
69 | + return $this->defaults->getBaseUrl(); |
|
70 | + } |
|
71 | + |
|
72 | + /** |
|
73 | + * link to the desktop sync client |
|
74 | + * @return string |
|
75 | + * @since 6.0.0 |
|
76 | + */ |
|
77 | + public function getSyncClientUrl() { |
|
78 | + return $this->defaults->getSyncClientUrl(); |
|
79 | + } |
|
80 | + |
|
81 | + /** |
|
82 | + * link to the iOS client |
|
83 | + * @return string |
|
84 | + * @since 8.0.0 |
|
85 | + */ |
|
86 | + public function getiOSClientUrl() { |
|
87 | + return $this->defaults->getiOSClientUrl(); |
|
88 | + } |
|
89 | + |
|
90 | + /** |
|
91 | + * link to the Android client |
|
92 | + * @return string |
|
93 | + * @since 8.0.0 |
|
94 | + */ |
|
95 | + public function getAndroidClientUrl() { |
|
96 | + return $this->defaults->getAndroidClientUrl(); |
|
97 | + } |
|
98 | + |
|
99 | + /** |
|
100 | + * base URL to the documentation of your ownCloud instance |
|
101 | + * @return string |
|
102 | + * @since 6.0.0 |
|
103 | + */ |
|
104 | + public function getDocBaseUrl() { |
|
105 | + return $this->defaults->getDocBaseUrl(); |
|
106 | + } |
|
107 | + |
|
108 | + /** |
|
109 | + * name of your ownCloud instance |
|
110 | + * @return string |
|
111 | + * @since 6.0.0 |
|
112 | + */ |
|
113 | + public function getName() { |
|
114 | + return $this->defaults->getName(); |
|
115 | + } |
|
116 | + |
|
117 | + /** |
|
118 | + * name of your ownCloud instance containing HTML styles |
|
119 | + * @return string |
|
120 | + * @since 8.0.0 |
|
121 | + */ |
|
122 | + public function getHTMLName() { |
|
123 | + return $this->defaults->getHTMLName(); |
|
124 | + } |
|
125 | + |
|
126 | + /** |
|
127 | + * Entity behind your onwCloud instance |
|
128 | + * @return string |
|
129 | + * @since 6.0.0 |
|
130 | + */ |
|
131 | + public function getEntity() { |
|
132 | + return $this->defaults->getEntity(); |
|
133 | + } |
|
134 | + |
|
135 | + /** |
|
136 | + * ownCloud slogan |
|
137 | + * @return string |
|
138 | + * @since 6.0.0 |
|
139 | + */ |
|
140 | + public function getSlogan(?string $lang = null) { |
|
141 | + return $this->defaults->getSlogan($lang); |
|
142 | + } |
|
143 | + |
|
144 | + /** |
|
145 | + * footer, short version |
|
146 | + * @return string |
|
147 | + * @since 6.0.0 |
|
148 | + */ |
|
149 | + public function getShortFooter() { |
|
150 | + return $this->defaults->getShortFooter(); |
|
151 | + } |
|
152 | + |
|
153 | + /** |
|
154 | + * footer, long version |
|
155 | + * @return string |
|
156 | + * @since 6.0.0 |
|
157 | + */ |
|
158 | + public function getLongFooter() { |
|
159 | + return $this->defaults->getLongFooter(); |
|
160 | + } |
|
161 | + |
|
162 | + /** |
|
163 | + * Returns the AppId for the App Store for the iOS Client |
|
164 | + * @return string AppId |
|
165 | + * @since 8.0.0 |
|
166 | + */ |
|
167 | + public function getiTunesAppId() { |
|
168 | + return $this->defaults->getiTunesAppId(); |
|
169 | + } |
|
170 | + |
|
171 | + /** |
|
172 | + * Themed logo url |
|
173 | + * |
|
174 | + * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
175 | + * @return string |
|
176 | + * @since 12.0.0 |
|
177 | + */ |
|
178 | + public function getLogo($useSvg = true) { |
|
179 | + return $this->defaults->getLogo($useSvg); |
|
180 | + } |
|
181 | + |
|
182 | + /** |
|
183 | + * Returns primary color |
|
184 | + * @return string |
|
185 | + * @since 12.0.0 |
|
186 | + */ |
|
187 | + public function getColorPrimary() { |
|
188 | + return $this->defaults->getColorPrimary(); |
|
189 | + } |
|
190 | + |
|
191 | + /** |
|
192 | + * @param string $key |
|
193 | + * @return string URL to doc with key |
|
194 | + * @since 12.0.0 |
|
195 | + */ |
|
196 | + public function buildDocLinkToKey($key) { |
|
197 | + return $this->defaults->buildDocLinkToKey($key); |
|
198 | + } |
|
199 | + |
|
200 | + /** |
|
201 | + * Returns the title |
|
202 | + * @return string title |
|
203 | + * @since 12.0.0 |
|
204 | + */ |
|
205 | + public function getTitle() { |
|
206 | + return $this->defaults->getTitle(); |
|
207 | + } |
|
208 | + |
|
209 | + /** |
|
210 | + * Returns primary color |
|
211 | + * @return string |
|
212 | + * @since 13.0.0 |
|
213 | + */ |
|
214 | + public function getTextColorPrimary() { |
|
215 | + return $this->defaults->getTextColorPrimary(); |
|
216 | + } |
|
217 | 217 | } |
@@ -20,108 +20,108 @@ |
||
20 | 20 | |
21 | 21 | class OC_Theme { |
22 | 22 | |
23 | - /** |
|
24 | - * Returns the base URL |
|
25 | - * @return string URL |
|
26 | - */ |
|
27 | - public function getBaseUrl() { |
|
28 | - return 'https://nextcloud.com'; |
|
29 | - } |
|
30 | - |
|
31 | - /** |
|
32 | - * Returns the documentation URL |
|
33 | - * @return string URL |
|
34 | - */ |
|
35 | - public function getDocBaseUrl() { |
|
36 | - return 'https://docs.nextcloud.com'; |
|
37 | - } |
|
38 | - |
|
39 | - /** |
|
40 | - * Returns the title |
|
41 | - * @return string title |
|
42 | - */ |
|
43 | - public function getTitle() { |
|
44 | - return 'Custom Cloud'; |
|
45 | - } |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the short name of the software |
|
49 | - * @return string title |
|
50 | - */ |
|
51 | - public function getName() { |
|
52 | - return 'Custom Cloud'; |
|
53 | - } |
|
54 | - |
|
55 | - /** |
|
56 | - * Returns the short name of the software containing HTML strings |
|
57 | - * @return string title |
|
58 | - */ |
|
59 | - public function getHTMLName() { |
|
60 | - return 'Custom Cloud'; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
65 | - * @return string entity name |
|
66 | - */ |
|
67 | - public function getEntity() { |
|
68 | - return 'Custom Cloud Co.'; |
|
69 | - } |
|
70 | - |
|
71 | - /** |
|
72 | - * Returns slogan |
|
73 | - * @return string slogan |
|
74 | - */ |
|
75 | - public function getSlogan() { |
|
76 | - return 'Your custom cloud, personalized for you!'; |
|
77 | - } |
|
78 | - |
|
79 | - /** |
|
80 | - * Returns short version of the footer |
|
81 | - * @return string short footer |
|
82 | - */ |
|
83 | - public function getShortFooter() { |
|
84 | - $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . |
|
85 | - '<br/>' . $this->getSlogan(); |
|
86 | - |
|
87 | - return $footer; |
|
88 | - } |
|
89 | - |
|
90 | - /** |
|
91 | - * Returns long version of the footer |
|
92 | - * @return string long footer |
|
93 | - */ |
|
94 | - public function getLongFooter() { |
|
95 | - $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . |
|
96 | - '<br/>' . $this->getSlogan(); |
|
97 | - |
|
98 | - return $footer; |
|
99 | - } |
|
100 | - |
|
101 | - /** |
|
102 | - * Generate a documentation link for a given key |
|
103 | - * @return string documentation link |
|
104 | - */ |
|
105 | - public function buildDocLinkToKey($key) { |
|
106 | - return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key; |
|
107 | - } |
|
108 | - |
|
109 | - |
|
110 | - /** |
|
111 | - * Returns mail header color |
|
112 | - * @return string |
|
113 | - */ |
|
114 | - public function getColorPrimary() { |
|
115 | - return '#745bca'; |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * Returns variables to overload defaults from core/css/variables.scss |
|
120 | - * @return array |
|
121 | - */ |
|
122 | - public function getScssVariables() { |
|
123 | - return [ |
|
124 | - 'color-primary' => '#745bca' |
|
125 | - ]; |
|
126 | - } |
|
23 | + /** |
|
24 | + * Returns the base URL |
|
25 | + * @return string URL |
|
26 | + */ |
|
27 | + public function getBaseUrl() { |
|
28 | + return 'https://nextcloud.com'; |
|
29 | + } |
|
30 | + |
|
31 | + /** |
|
32 | + * Returns the documentation URL |
|
33 | + * @return string URL |
|
34 | + */ |
|
35 | + public function getDocBaseUrl() { |
|
36 | + return 'https://docs.nextcloud.com'; |
|
37 | + } |
|
38 | + |
|
39 | + /** |
|
40 | + * Returns the title |
|
41 | + * @return string title |
|
42 | + */ |
|
43 | + public function getTitle() { |
|
44 | + return 'Custom Cloud'; |
|
45 | + } |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the short name of the software |
|
49 | + * @return string title |
|
50 | + */ |
|
51 | + public function getName() { |
|
52 | + return 'Custom Cloud'; |
|
53 | + } |
|
54 | + |
|
55 | + /** |
|
56 | + * Returns the short name of the software containing HTML strings |
|
57 | + * @return string title |
|
58 | + */ |
|
59 | + public function getHTMLName() { |
|
60 | + return 'Custom Cloud'; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
65 | + * @return string entity name |
|
66 | + */ |
|
67 | + public function getEntity() { |
|
68 | + return 'Custom Cloud Co.'; |
|
69 | + } |
|
70 | + |
|
71 | + /** |
|
72 | + * Returns slogan |
|
73 | + * @return string slogan |
|
74 | + */ |
|
75 | + public function getSlogan() { |
|
76 | + return 'Your custom cloud, personalized for you!'; |
|
77 | + } |
|
78 | + |
|
79 | + /** |
|
80 | + * Returns short version of the footer |
|
81 | + * @return string short footer |
|
82 | + */ |
|
83 | + public function getShortFooter() { |
|
84 | + $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . |
|
85 | + '<br/>' . $this->getSlogan(); |
|
86 | + |
|
87 | + return $footer; |
|
88 | + } |
|
89 | + |
|
90 | + /** |
|
91 | + * Returns long version of the footer |
|
92 | + * @return string long footer |
|
93 | + */ |
|
94 | + public function getLongFooter() { |
|
95 | + $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' . |
|
96 | + '<br/>' . $this->getSlogan(); |
|
97 | + |
|
98 | + return $footer; |
|
99 | + } |
|
100 | + |
|
101 | + /** |
|
102 | + * Generate a documentation link for a given key |
|
103 | + * @return string documentation link |
|
104 | + */ |
|
105 | + public function buildDocLinkToKey($key) { |
|
106 | + return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key; |
|
107 | + } |
|
108 | + |
|
109 | + |
|
110 | + /** |
|
111 | + * Returns mail header color |
|
112 | + * @return string |
|
113 | + */ |
|
114 | + public function getColorPrimary() { |
|
115 | + return '#745bca'; |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * Returns variables to overload defaults from core/css/variables.scss |
|
120 | + * @return array |
|
121 | + */ |
|
122 | + public function getScssVariables() { |
|
123 | + return [ |
|
124 | + 'color-primary' => '#745bca' |
|
125 | + ]; |
|
126 | + } |
|
127 | 127 | } |