| @@ 131-146 (lines=16) @@ | ||
| 128 | * |
|
| 129 | * @return string |
|
| 130 | */ |
|
| 131 | public function getLogo() { |
|
| 132 | $logo = $this->config->getAppValue('theming', 'logoMime'); |
|
| 133 | ||
| 134 | $logoExists = true; |
|
| 135 | try { |
|
| 136 | $this->appData->getFolder('images')->getFile('logo'); |
|
| 137 | } catch (\Exception $e) { |
|
| 138 | $logoExists = false; |
|
| 139 | } |
|
| 140 | ||
| 141 | if(!$logo || !$logoExists) { |
|
| 142 | return $this->urlGenerator->imagePath('core','logo.svg'); |
|
| 143 | } |
|
| 144 | ||
| 145 | return $this->urlGenerator->linkToRoute('theming.Theming.getLogo'); |
|
| 146 | } |
|
| 147 | ||
| 148 | /** |
|
| 149 | * Themed background image url |
|
| @@ 153-168 (lines=16) @@ | ||
| 150 | * |
|
| 151 | * @return string |
|
| 152 | */ |
|
| 153 | public function getBackground() { |
|
| 154 | $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime'); |
|
| 155 | ||
| 156 | $backgroundExists = true; |
|
| 157 | try { |
|
| 158 | $this->appData->getFolder('images')->getFile('background'); |
|
| 159 | } catch (\Exception $e) { |
|
| 160 | $backgroundExists = false; |
|
| 161 | } |
|
| 162 | ||
| 163 | if(!$backgroundLogo || !$backgroundExists) { |
|
| 164 | return $this->urlGenerator->imagePath('core','background.jpg'); |
|
| 165 | } |
|
| 166 | ||
| 167 | return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground'); |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * Check if Imagemagick is enabled and if SVG is supported |
|