| @@ 200-206 (lines=7) @@ | ||
| 197 | * @param string $fileName |
|
| 198 | * @return string |
|
| 199 | */ |
|
| 200 | public function getCachedJS($appName, $fileName) { |
|
| 201 | $tmpfileLoc = explode('/', $fileName); |
|
| 202 | $fileName = array_pop($tmpfileLoc); |
|
| 203 | $fileName = str_replace('.json', '.js', $fileName); |
|
| 204 | ||
| 205 | return substr($this->urlGenerator->linkToRoute('core.Js.getJs', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1); |
|
| 206 | } |
|
| 207 | ||
| 208 | /** |
|
| 209 | * @param string $root |
|
| @@ 317-323 (lines=7) @@ | ||
| 314 | * @param string $fileName |
|
| 315 | * @return string |
|
| 316 | */ |
|
| 317 | public function getCachedSCSS(string $appName, string $fileName): string { |
|
| 318 | $tmpfileLoc = explode('/', $fileName); |
|
| 319 | $fileName = array_pop($tmpfileLoc); |
|
| 320 | $fileName = $this->prependBaseurlPrefix(str_replace('.scss', '.css', $fileName)); |
|
| 321 | ||
| 322 | return substr($this->urlGenerator->linkToRoute('core.Css.getCss', ['fileName' => $fileName, 'appName' => $appName]), strlen(\OC::$WEBROOT) + 1); |
|
| 323 | } |
|
| 324 | ||
| 325 | /** |
|
| 326 | * Prepend hashed base url to the css file |
|