@@ -20,145 +20,145 @@ |
||
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 URL where the sync clients are listed |
|
33 | - * @return string URL |
|
34 | - */ |
|
35 | - public function getSyncClientUrl() { |
|
36 | - return 'https://nextcloud.com/install/#install-clients'; |
|
37 | - } |
|
38 | - |
|
39 | - /** |
|
40 | - * Returns the URL to the App Store for the iOS Client |
|
41 | - * @return string URL |
|
42 | - */ |
|
43 | - public function getiOSClientUrl() { |
|
44 | - return 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
45 | - } |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the AppId for the App Store for the iOS Client |
|
49 | - * @return string AppId |
|
50 | - */ |
|
51 | - public function getiTunesAppId() { |
|
52 | - return '1125420102'; |
|
53 | - } |
|
54 | - |
|
55 | - /** |
|
56 | - * Returns the URL to Google Play for the Android Client |
|
57 | - * @return string URL |
|
58 | - */ |
|
59 | - public function getAndroidClientUrl() { |
|
60 | - return 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Returns the documentation URL |
|
65 | - * @return string URL |
|
66 | - */ |
|
67 | - public function getDocBaseUrl() { |
|
68 | - return 'https://docs.nextcloud.com'; |
|
69 | - } |
|
70 | - |
|
71 | - /** |
|
72 | - * Returns the title |
|
73 | - * @return string title |
|
74 | - */ |
|
75 | - public function getTitle() { |
|
76 | - return 'Custom Cloud'; |
|
77 | - } |
|
78 | - |
|
79 | - /** |
|
80 | - * Returns the short name of the software |
|
81 | - * @return string title |
|
82 | - */ |
|
83 | - public function getName() { |
|
84 | - return 'Custom Cloud'; |
|
85 | - } |
|
86 | - |
|
87 | - /** |
|
88 | - * Returns the short name of the software containing HTML strings |
|
89 | - * @return string title |
|
90 | - */ |
|
91 | - public function getHTMLName() { |
|
92 | - return 'Custom Cloud'; |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
97 | - * @return string entity name |
|
98 | - */ |
|
99 | - public function getEntity() { |
|
100 | - return 'Custom Cloud Co.'; |
|
101 | - } |
|
102 | - |
|
103 | - /** |
|
104 | - * Returns slogan |
|
105 | - * @return string slogan |
|
106 | - */ |
|
107 | - public function getSlogan() { |
|
108 | - return 'Your custom cloud, personalized for you!'; |
|
109 | - } |
|
110 | - |
|
111 | - /** |
|
112 | - * Returns logo claim |
|
113 | - * @return string logo claim |
|
114 | - */ |
|
115 | - public function getLogoClaim() { |
|
116 | - return ''; |
|
117 | - } |
|
118 | - |
|
119 | - /** |
|
120 | - * Returns short version of the footer |
|
121 | - * @return string short footer |
|
122 | - */ |
|
123 | - public function getShortFooter() { |
|
124 | - $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
125 | - '<br/>' . $this->getSlogan(); |
|
126 | - |
|
127 | - return $footer; |
|
128 | - } |
|
129 | - |
|
130 | - /** |
|
131 | - * Returns long version of the footer |
|
132 | - * @return string long footer |
|
133 | - */ |
|
134 | - public function getLongFooter() { |
|
135 | - $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
136 | - '<br/>' . $this->getSlogan(); |
|
137 | - |
|
138 | - return $footer; |
|
139 | - } |
|
140 | - |
|
141 | - public function buildDocLinkToKey($key) { |
|
142 | - return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
143 | - } |
|
144 | - |
|
145 | - |
|
146 | - /** |
|
147 | - * Returns mail header color |
|
148 | - * @return string |
|
149 | - */ |
|
150 | - public function getColorPrimary() { |
|
151 | - return '#745bca'; |
|
152 | - } |
|
153 | - |
|
154 | - /** |
|
155 | - * Returns variables to overload defaults from core/css/variables.scss |
|
156 | - * @return array |
|
157 | - */ |
|
158 | - public function getScssVariables() { |
|
159 | - return [ |
|
160 | - 'color-primary' => '#745bca' |
|
161 | - ]; |
|
162 | - } |
|
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 URL where the sync clients are listed |
|
33 | + * @return string URL |
|
34 | + */ |
|
35 | + public function getSyncClientUrl() { |
|
36 | + return 'https://nextcloud.com/install/#install-clients'; |
|
37 | + } |
|
38 | + |
|
39 | + /** |
|
40 | + * Returns the URL to the App Store for the iOS Client |
|
41 | + * @return string URL |
|
42 | + */ |
|
43 | + public function getiOSClientUrl() { |
|
44 | + return 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
45 | + } |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the AppId for the App Store for the iOS Client |
|
49 | + * @return string AppId |
|
50 | + */ |
|
51 | + public function getiTunesAppId() { |
|
52 | + return '1125420102'; |
|
53 | + } |
|
54 | + |
|
55 | + /** |
|
56 | + * Returns the URL to Google Play for the Android Client |
|
57 | + * @return string URL |
|
58 | + */ |
|
59 | + public function getAndroidClientUrl() { |
|
60 | + return 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Returns the documentation URL |
|
65 | + * @return string URL |
|
66 | + */ |
|
67 | + public function getDocBaseUrl() { |
|
68 | + return 'https://docs.nextcloud.com'; |
|
69 | + } |
|
70 | + |
|
71 | + /** |
|
72 | + * Returns the title |
|
73 | + * @return string title |
|
74 | + */ |
|
75 | + public function getTitle() { |
|
76 | + return 'Custom Cloud'; |
|
77 | + } |
|
78 | + |
|
79 | + /** |
|
80 | + * Returns the short name of the software |
|
81 | + * @return string title |
|
82 | + */ |
|
83 | + public function getName() { |
|
84 | + return 'Custom Cloud'; |
|
85 | + } |
|
86 | + |
|
87 | + /** |
|
88 | + * Returns the short name of the software containing HTML strings |
|
89 | + * @return string title |
|
90 | + */ |
|
91 | + public function getHTMLName() { |
|
92 | + return 'Custom Cloud'; |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
97 | + * @return string entity name |
|
98 | + */ |
|
99 | + public function getEntity() { |
|
100 | + return 'Custom Cloud Co.'; |
|
101 | + } |
|
102 | + |
|
103 | + /** |
|
104 | + * Returns slogan |
|
105 | + * @return string slogan |
|
106 | + */ |
|
107 | + public function getSlogan() { |
|
108 | + return 'Your custom cloud, personalized for you!'; |
|
109 | + } |
|
110 | + |
|
111 | + /** |
|
112 | + * Returns logo claim |
|
113 | + * @return string logo claim |
|
114 | + */ |
|
115 | + public function getLogoClaim() { |
|
116 | + return ''; |
|
117 | + } |
|
118 | + |
|
119 | + /** |
|
120 | + * Returns short version of the footer |
|
121 | + * @return string short footer |
|
122 | + */ |
|
123 | + public function getShortFooter() { |
|
124 | + $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
125 | + '<br/>' . $this->getSlogan(); |
|
126 | + |
|
127 | + return $footer; |
|
128 | + } |
|
129 | + |
|
130 | + /** |
|
131 | + * Returns long version of the footer |
|
132 | + * @return string long footer |
|
133 | + */ |
|
134 | + public function getLongFooter() { |
|
135 | + $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
136 | + '<br/>' . $this->getSlogan(); |
|
137 | + |
|
138 | + return $footer; |
|
139 | + } |
|
140 | + |
|
141 | + public function buildDocLinkToKey($key) { |
|
142 | + return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
143 | + } |
|
144 | + |
|
145 | + |
|
146 | + /** |
|
147 | + * Returns mail header color |
|
148 | + * @return string |
|
149 | + */ |
|
150 | + public function getColorPrimary() { |
|
151 | + return '#745bca'; |
|
152 | + } |
|
153 | + |
|
154 | + /** |
|
155 | + * Returns variables to overload defaults from core/css/variables.scss |
|
156 | + * @return array |
|
157 | + */ |
|
158 | + public function getScssVariables() { |
|
159 | + return [ |
|
160 | + 'color-primary' => '#745bca' |
|
161 | + ]; |
|
162 | + } |
|
163 | 163 | |
164 | 164 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getShortFooter() { |
124 | 124 | $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
125 | - '<br/>' . $this->getSlogan(); |
|
125 | + '<br/>'.$this->getSlogan(); |
|
126 | 126 | |
127 | 127 | return $footer; |
128 | 128 | } |
@@ -133,13 +133,13 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function getLongFooter() { |
135 | 135 | $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
136 | - '<br/>' . $this->getSlogan(); |
|
136 | + '<br/>'.$this->getSlogan(); |
|
137 | 137 | |
138 | 138 | return $footer; |
139 | 139 | } |
140 | 140 | |
141 | 141 | public function buildDocLinkToKey($key) { |
142 | - return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
142 | + return $this->getDocBaseUrl().'/server/12/go.php?to='.$key; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 |
@@ -31,289 +31,289 @@ |
||
31 | 31 | */ |
32 | 32 | class OC_Defaults { |
33 | 33 | |
34 | - private $theme; |
|
35 | - private $l; |
|
34 | + private $theme; |
|
35 | + private $l; |
|
36 | 36 | |
37 | - private $defaultEntity; |
|
38 | - private $defaultName; |
|
39 | - private $defaultTitle; |
|
40 | - private $defaultBaseUrl; |
|
41 | - private $defaultSyncClientUrl; |
|
42 | - private $defaultiOSClientUrl; |
|
43 | - private $defaultiTunesAppId; |
|
44 | - private $defaultAndroidClientUrl; |
|
45 | - private $defaultDocBaseUrl; |
|
46 | - private $defaultDocVersion; |
|
47 | - private $defaultSlogan; |
|
48 | - private $defaultLogoClaim; |
|
49 | - private $defaultColorPrimary; |
|
50 | - private $defaultLogoUrl; |
|
37 | + private $defaultEntity; |
|
38 | + private $defaultName; |
|
39 | + private $defaultTitle; |
|
40 | + private $defaultBaseUrl; |
|
41 | + private $defaultSyncClientUrl; |
|
42 | + private $defaultiOSClientUrl; |
|
43 | + private $defaultiTunesAppId; |
|
44 | + private $defaultAndroidClientUrl; |
|
45 | + private $defaultDocBaseUrl; |
|
46 | + private $defaultDocVersion; |
|
47 | + private $defaultSlogan; |
|
48 | + private $defaultLogoClaim; |
|
49 | + private $defaultColorPrimary; |
|
50 | + private $defaultLogoUrl; |
|
51 | 51 | |
52 | - function __construct() { |
|
53 | - $this->l = \OC::$server->getL10N('lib'); |
|
52 | + function __construct() { |
|
53 | + $this->l = \OC::$server->getL10N('lib'); |
|
54 | 54 | |
55 | - $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ |
|
56 | - $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ |
|
57 | - $this->defaultTitle = 'Nextcloud'; /* can be a longer name, for titles */ |
|
58 | - $this->defaultBaseUrl = 'https://nextcloud.com'; |
|
59 | - $this->defaultSyncClientUrl = 'https://nextcloud.com/install/#install-clients'; |
|
60 | - $this->defaultiOSClientUrl = 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
61 | - $this->defaultiTunesAppId = '1125420102'; |
|
62 | - $this->defaultAndroidClientUrl = 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
63 | - $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; |
|
64 | - $this->defaultDocVersion = '12'; // used to generate doc links |
|
65 | - $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
|
66 | - $this->defaultLogoClaim = ''; |
|
67 | - $this->defaultColorPrimary = '#0082c9'; |
|
68 | - $this->defaultLogoUrl = \OC::$server->getURLGenerator()->imagePath('core','logo.svg'); |
|
69 | - $this->defaultLogoUrl .= '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
55 | + $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ |
|
56 | + $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ |
|
57 | + $this->defaultTitle = 'Nextcloud'; /* can be a longer name, for titles */ |
|
58 | + $this->defaultBaseUrl = 'https://nextcloud.com'; |
|
59 | + $this->defaultSyncClientUrl = 'https://nextcloud.com/install/#install-clients'; |
|
60 | + $this->defaultiOSClientUrl = 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
61 | + $this->defaultiTunesAppId = '1125420102'; |
|
62 | + $this->defaultAndroidClientUrl = 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
63 | + $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; |
|
64 | + $this->defaultDocVersion = '12'; // used to generate doc links |
|
65 | + $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
|
66 | + $this->defaultLogoClaim = ''; |
|
67 | + $this->defaultColorPrimary = '#0082c9'; |
|
68 | + $this->defaultLogoUrl = \OC::$server->getURLGenerator()->imagePath('core','logo.svg'); |
|
69 | + $this->defaultLogoUrl .= '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
70 | 70 | |
71 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
72 | - if (file_exists($themePath)) { |
|
73 | - // prevent defaults.php from printing output |
|
74 | - ob_start(); |
|
75 | - require_once $themePath; |
|
76 | - ob_end_clean(); |
|
77 | - if (class_exists('OC_Theme')) { |
|
78 | - $this->theme = new OC_Theme(); |
|
79 | - } |
|
80 | - } |
|
81 | - } |
|
71 | + $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
72 | + if (file_exists($themePath)) { |
|
73 | + // prevent defaults.php from printing output |
|
74 | + ob_start(); |
|
75 | + require_once $themePath; |
|
76 | + ob_end_clean(); |
|
77 | + if (class_exists('OC_Theme')) { |
|
78 | + $this->theme = new OC_Theme(); |
|
79 | + } |
|
80 | + } |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * @param string $method |
|
85 | - */ |
|
86 | - private function themeExist($method) { |
|
87 | - if (isset($this->theme) && method_exists($this->theme, $method)) { |
|
88 | - return true; |
|
89 | - } |
|
90 | - return false; |
|
91 | - } |
|
83 | + /** |
|
84 | + * @param string $method |
|
85 | + */ |
|
86 | + private function themeExist($method) { |
|
87 | + if (isset($this->theme) && method_exists($this->theme, $method)) { |
|
88 | + return true; |
|
89 | + } |
|
90 | + return false; |
|
91 | + } |
|
92 | 92 | |
93 | - /** |
|
94 | - * Returns the base URL |
|
95 | - * @return string URL |
|
96 | - */ |
|
97 | - public function getBaseUrl() { |
|
98 | - if ($this->themeExist('getBaseUrl')) { |
|
99 | - return $this->theme->getBaseUrl(); |
|
100 | - } else { |
|
101 | - return $this->defaultBaseUrl; |
|
102 | - } |
|
103 | - } |
|
93 | + /** |
|
94 | + * Returns the base URL |
|
95 | + * @return string URL |
|
96 | + */ |
|
97 | + public function getBaseUrl() { |
|
98 | + if ($this->themeExist('getBaseUrl')) { |
|
99 | + return $this->theme->getBaseUrl(); |
|
100 | + } else { |
|
101 | + return $this->defaultBaseUrl; |
|
102 | + } |
|
103 | + } |
|
104 | 104 | |
105 | - /** |
|
106 | - * Returns the URL where the sync clients are listed |
|
107 | - * @return string URL |
|
108 | - */ |
|
109 | - public function getSyncClientUrl() { |
|
110 | - if ($this->themeExist('getSyncClientUrl')) { |
|
111 | - return $this->theme->getSyncClientUrl(); |
|
112 | - } else { |
|
113 | - return $this->defaultSyncClientUrl; |
|
114 | - } |
|
115 | - } |
|
105 | + /** |
|
106 | + * Returns the URL where the sync clients are listed |
|
107 | + * @return string URL |
|
108 | + */ |
|
109 | + public function getSyncClientUrl() { |
|
110 | + if ($this->themeExist('getSyncClientUrl')) { |
|
111 | + return $this->theme->getSyncClientUrl(); |
|
112 | + } else { |
|
113 | + return $this->defaultSyncClientUrl; |
|
114 | + } |
|
115 | + } |
|
116 | 116 | |
117 | - /** |
|
118 | - * Returns the URL to the App Store for the iOS Client |
|
119 | - * @return string URL |
|
120 | - */ |
|
121 | - public function getiOSClientUrl() { |
|
122 | - if ($this->themeExist('getiOSClientUrl')) { |
|
123 | - return $this->theme->getiOSClientUrl(); |
|
124 | - } else { |
|
125 | - return $this->defaultiOSClientUrl; |
|
126 | - } |
|
127 | - } |
|
117 | + /** |
|
118 | + * Returns the URL to the App Store for the iOS Client |
|
119 | + * @return string URL |
|
120 | + */ |
|
121 | + public function getiOSClientUrl() { |
|
122 | + if ($this->themeExist('getiOSClientUrl')) { |
|
123 | + return $this->theme->getiOSClientUrl(); |
|
124 | + } else { |
|
125 | + return $this->defaultiOSClientUrl; |
|
126 | + } |
|
127 | + } |
|
128 | 128 | |
129 | - /** |
|
130 | - * Returns the AppId for the App Store for the iOS Client |
|
131 | - * @return string AppId |
|
132 | - */ |
|
133 | - public function getiTunesAppId() { |
|
134 | - if ($this->themeExist('getiTunesAppId')) { |
|
135 | - return $this->theme->getiTunesAppId(); |
|
136 | - } else { |
|
137 | - return $this->defaultiTunesAppId; |
|
138 | - } |
|
139 | - } |
|
129 | + /** |
|
130 | + * Returns the AppId for the App Store for the iOS Client |
|
131 | + * @return string AppId |
|
132 | + */ |
|
133 | + public function getiTunesAppId() { |
|
134 | + if ($this->themeExist('getiTunesAppId')) { |
|
135 | + return $this->theme->getiTunesAppId(); |
|
136 | + } else { |
|
137 | + return $this->defaultiTunesAppId; |
|
138 | + } |
|
139 | + } |
|
140 | 140 | |
141 | - /** |
|
142 | - * Returns the URL to Google Play for the Android Client |
|
143 | - * @return string URL |
|
144 | - */ |
|
145 | - public function getAndroidClientUrl() { |
|
146 | - if ($this->themeExist('getAndroidClientUrl')) { |
|
147 | - return $this->theme->getAndroidClientUrl(); |
|
148 | - } else { |
|
149 | - return $this->defaultAndroidClientUrl; |
|
150 | - } |
|
151 | - } |
|
141 | + /** |
|
142 | + * Returns the URL to Google Play for the Android Client |
|
143 | + * @return string URL |
|
144 | + */ |
|
145 | + public function getAndroidClientUrl() { |
|
146 | + if ($this->themeExist('getAndroidClientUrl')) { |
|
147 | + return $this->theme->getAndroidClientUrl(); |
|
148 | + } else { |
|
149 | + return $this->defaultAndroidClientUrl; |
|
150 | + } |
|
151 | + } |
|
152 | 152 | |
153 | - /** |
|
154 | - * Returns the documentation URL |
|
155 | - * @return string URL |
|
156 | - */ |
|
157 | - public function getDocBaseUrl() { |
|
158 | - if ($this->themeExist('getDocBaseUrl')) { |
|
159 | - return $this->theme->getDocBaseUrl(); |
|
160 | - } else { |
|
161 | - return $this->defaultDocBaseUrl; |
|
162 | - } |
|
163 | - } |
|
153 | + /** |
|
154 | + * Returns the documentation URL |
|
155 | + * @return string URL |
|
156 | + */ |
|
157 | + public function getDocBaseUrl() { |
|
158 | + if ($this->themeExist('getDocBaseUrl')) { |
|
159 | + return $this->theme->getDocBaseUrl(); |
|
160 | + } else { |
|
161 | + return $this->defaultDocBaseUrl; |
|
162 | + } |
|
163 | + } |
|
164 | 164 | |
165 | - /** |
|
166 | - * Returns the title |
|
167 | - * @return string title |
|
168 | - */ |
|
169 | - public function getTitle() { |
|
170 | - if ($this->themeExist('getTitle')) { |
|
171 | - return $this->theme->getTitle(); |
|
172 | - } else { |
|
173 | - return $this->defaultTitle; |
|
174 | - } |
|
175 | - } |
|
165 | + /** |
|
166 | + * Returns the title |
|
167 | + * @return string title |
|
168 | + */ |
|
169 | + public function getTitle() { |
|
170 | + if ($this->themeExist('getTitle')) { |
|
171 | + return $this->theme->getTitle(); |
|
172 | + } else { |
|
173 | + return $this->defaultTitle; |
|
174 | + } |
|
175 | + } |
|
176 | 176 | |
177 | - /** |
|
178 | - * Returns the short name of the software |
|
179 | - * @return string title |
|
180 | - */ |
|
181 | - public function getName() { |
|
182 | - if ($this->themeExist('getName')) { |
|
183 | - return $this->theme->getName(); |
|
184 | - } else { |
|
185 | - return $this->defaultName; |
|
186 | - } |
|
187 | - } |
|
177 | + /** |
|
178 | + * Returns the short name of the software |
|
179 | + * @return string title |
|
180 | + */ |
|
181 | + public function getName() { |
|
182 | + if ($this->themeExist('getName')) { |
|
183 | + return $this->theme->getName(); |
|
184 | + } else { |
|
185 | + return $this->defaultName; |
|
186 | + } |
|
187 | + } |
|
188 | 188 | |
189 | - /** |
|
190 | - * Returns the short name of the software containing HTML strings |
|
191 | - * @return string title |
|
192 | - */ |
|
193 | - public function getHTMLName() { |
|
194 | - if ($this->themeExist('getHTMLName')) { |
|
195 | - return $this->theme->getHTMLName(); |
|
196 | - } else { |
|
197 | - return $this->defaultName; |
|
198 | - } |
|
199 | - } |
|
189 | + /** |
|
190 | + * Returns the short name of the software containing HTML strings |
|
191 | + * @return string title |
|
192 | + */ |
|
193 | + public function getHTMLName() { |
|
194 | + if ($this->themeExist('getHTMLName')) { |
|
195 | + return $this->theme->getHTMLName(); |
|
196 | + } else { |
|
197 | + return $this->defaultName; |
|
198 | + } |
|
199 | + } |
|
200 | 200 | |
201 | - /** |
|
202 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
203 | - * @return string entity name |
|
204 | - */ |
|
205 | - public function getEntity() { |
|
206 | - if ($this->themeExist('getEntity')) { |
|
207 | - return $this->theme->getEntity(); |
|
208 | - } else { |
|
209 | - return $this->defaultEntity; |
|
210 | - } |
|
211 | - } |
|
201 | + /** |
|
202 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
203 | + * @return string entity name |
|
204 | + */ |
|
205 | + public function getEntity() { |
|
206 | + if ($this->themeExist('getEntity')) { |
|
207 | + return $this->theme->getEntity(); |
|
208 | + } else { |
|
209 | + return $this->defaultEntity; |
|
210 | + } |
|
211 | + } |
|
212 | 212 | |
213 | - /** |
|
214 | - * Returns slogan |
|
215 | - * @return string slogan |
|
216 | - */ |
|
217 | - public function getSlogan() { |
|
218 | - if ($this->themeExist('getSlogan')) { |
|
219 | - return $this->theme->getSlogan(); |
|
220 | - } else { |
|
221 | - return $this->defaultSlogan; |
|
222 | - } |
|
223 | - } |
|
213 | + /** |
|
214 | + * Returns slogan |
|
215 | + * @return string slogan |
|
216 | + */ |
|
217 | + public function getSlogan() { |
|
218 | + if ($this->themeExist('getSlogan')) { |
|
219 | + return $this->theme->getSlogan(); |
|
220 | + } else { |
|
221 | + return $this->defaultSlogan; |
|
222 | + } |
|
223 | + } |
|
224 | 224 | |
225 | - /** |
|
226 | - * Returns logo claim |
|
227 | - * @return string logo claim |
|
228 | - */ |
|
229 | - public function getLogoClaim() { |
|
230 | - if ($this->themeExist('getLogoClaim')) { |
|
231 | - return $this->theme->getLogoClaim(); |
|
232 | - } else { |
|
233 | - return $this->defaultLogoClaim; |
|
234 | - } |
|
235 | - } |
|
225 | + /** |
|
226 | + * Returns logo claim |
|
227 | + * @return string logo claim |
|
228 | + */ |
|
229 | + public function getLogoClaim() { |
|
230 | + if ($this->themeExist('getLogoClaim')) { |
|
231 | + return $this->theme->getLogoClaim(); |
|
232 | + } else { |
|
233 | + return $this->defaultLogoClaim; |
|
234 | + } |
|
235 | + } |
|
236 | 236 | |
237 | - /** |
|
238 | - * Returns short version of the footer |
|
239 | - * @return string short footer |
|
240 | - */ |
|
241 | - public function getShortFooter() { |
|
242 | - if ($this->themeExist('getShortFooter')) { |
|
243 | - $footer = $this->theme->getShortFooter(); |
|
244 | - } else { |
|
245 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
246 | - ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
247 | - ' – ' . $this->getSlogan(); |
|
248 | - } |
|
237 | + /** |
|
238 | + * Returns short version of the footer |
|
239 | + * @return string short footer |
|
240 | + */ |
|
241 | + public function getShortFooter() { |
|
242 | + if ($this->themeExist('getShortFooter')) { |
|
243 | + $footer = $this->theme->getShortFooter(); |
|
244 | + } else { |
|
245 | + $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
246 | + ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
247 | + ' – ' . $this->getSlogan(); |
|
248 | + } |
|
249 | 249 | |
250 | - return $footer; |
|
251 | - } |
|
250 | + return $footer; |
|
251 | + } |
|
252 | 252 | |
253 | - /** |
|
254 | - * Returns long version of the footer |
|
255 | - * @return string long footer |
|
256 | - */ |
|
257 | - public function getLongFooter() { |
|
258 | - if ($this->themeExist('getLongFooter')) { |
|
259 | - $footer = $this->theme->getLongFooter(); |
|
260 | - } else { |
|
261 | - $footer = $this->getShortFooter(); |
|
262 | - } |
|
253 | + /** |
|
254 | + * Returns long version of the footer |
|
255 | + * @return string long footer |
|
256 | + */ |
|
257 | + public function getLongFooter() { |
|
258 | + if ($this->themeExist('getLongFooter')) { |
|
259 | + $footer = $this->theme->getLongFooter(); |
|
260 | + } else { |
|
261 | + $footer = $this->getShortFooter(); |
|
262 | + } |
|
263 | 263 | |
264 | - return $footer; |
|
265 | - } |
|
264 | + return $footer; |
|
265 | + } |
|
266 | 266 | |
267 | - /** |
|
268 | - * @param string $key |
|
269 | - * @return string URL to doc with key |
|
270 | - */ |
|
271 | - public function buildDocLinkToKey($key) { |
|
272 | - if ($this->themeExist('buildDocLinkToKey')) { |
|
273 | - return $this->theme->buildDocLinkToKey($key); |
|
274 | - } |
|
275 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
276 | - } |
|
267 | + /** |
|
268 | + * @param string $key |
|
269 | + * @return string URL to doc with key |
|
270 | + */ |
|
271 | + public function buildDocLinkToKey($key) { |
|
272 | + if ($this->themeExist('buildDocLinkToKey')) { |
|
273 | + return $this->theme->buildDocLinkToKey($key); |
|
274 | + } |
|
275 | + return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
276 | + } |
|
277 | 277 | |
278 | - /** |
|
279 | - * Returns primary color |
|
280 | - * @return string |
|
281 | - */ |
|
282 | - public function getColorPrimary() { |
|
278 | + /** |
|
279 | + * Returns primary color |
|
280 | + * @return string |
|
281 | + */ |
|
282 | + public function getColorPrimary() { |
|
283 | 283 | |
284 | - if ($this->themeExist('getColorPrimary')) { |
|
285 | - return $this->theme->getColorPrimary(); |
|
286 | - } |
|
287 | - if ($this->themeExist('getMailHeaderColor')) { |
|
288 | - return $this->theme->getMailHeaderColor(); |
|
289 | - } |
|
290 | - return $this->defaultColorPrimary; |
|
291 | - } |
|
284 | + if ($this->themeExist('getColorPrimary')) { |
|
285 | + return $this->theme->getColorPrimary(); |
|
286 | + } |
|
287 | + if ($this->themeExist('getMailHeaderColor')) { |
|
288 | + return $this->theme->getMailHeaderColor(); |
|
289 | + } |
|
290 | + return $this->defaultColorPrimary; |
|
291 | + } |
|
292 | 292 | |
293 | - /** |
|
294 | - * @return array scss variables to overwrite |
|
295 | - */ |
|
296 | - public function getScssVariables() { |
|
297 | - if($this->themeExist('getScssVariables')) { |
|
298 | - return $this->theme->getScssVariables(); |
|
299 | - } |
|
300 | - return []; |
|
301 | - } |
|
293 | + /** |
|
294 | + * @return array scss variables to overwrite |
|
295 | + */ |
|
296 | + public function getScssVariables() { |
|
297 | + if($this->themeExist('getScssVariables')) { |
|
298 | + return $this->theme->getScssVariables(); |
|
299 | + } |
|
300 | + return []; |
|
301 | + } |
|
302 | 302 | |
303 | - public function shouldReplaceIcons() { |
|
304 | - return false; |
|
305 | - } |
|
303 | + public function shouldReplaceIcons() { |
|
304 | + return false; |
|
305 | + } |
|
306 | 306 | |
307 | - /** |
|
308 | - * Themed logo url |
|
309 | - * |
|
310 | - * @return string |
|
311 | - */ |
|
312 | - public function getLogo() { |
|
313 | - if ($this->themeExist('getLogo')) { |
|
314 | - return $this->theme->getLogo(); |
|
315 | - } |
|
307 | + /** |
|
308 | + * Themed logo url |
|
309 | + * |
|
310 | + * @return string |
|
311 | + */ |
|
312 | + public function getLogo() { |
|
313 | + if ($this->themeExist('getLogo')) { |
|
314 | + return $this->theme->getLogo(); |
|
315 | + } |
|
316 | 316 | |
317 | - return $this->defaultLogoUrl; |
|
318 | - } |
|
317 | + return $this->defaultLogoUrl; |
|
318 | + } |
|
319 | 319 | } |