| @@ 212-218 (lines=7) @@ | ||
| 209 | * @param string $fileName |
|
| 210 | * @return string |
|
| 211 | */ |
|
| 212 | public function getCachedJS($appName, $fileName) { |
|
| 213 | $tmpfileLoc = explode('/', $fileName); |
|
| 214 | $fileName = array_pop($tmpfileLoc); |
|
| 215 | $fileName = str_replace('.json', '.js', $fileName); |
|
| 216 | ||
| 217 | return substr($this->urlGenerator->linkToRoute('core.Js.getJs', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1); |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * @param string $root |
|
| @@ 360-366 (lines=7) @@ | ||
| 357 | * @param string $fileName |
|
| 358 | * @return string |
|
| 359 | */ |
|
| 360 | public function getCachedSCSS(string $appName, string $fileName): string { |
|
| 361 | $tmpfileLoc = explode('/', $fileName); |
|
| 362 | $fileName = array_pop($tmpfileLoc); |
|
| 363 | $fileName = $this->prependVersionPrefix($this->prependBaseurlPrefix(str_replace('.scss', '.css', $fileName)), $appName); |
|
| 364 | ||
| 365 | return substr($this->urlGenerator->linkToRoute('core.Css.getCss', ['fileName' => $fileName, 'appName' => $appName]), strlen(\OC::$WEBROOT) + 1); |
|
| 366 | } |
|
| 367 | ||
| 368 | /** |
|
| 369 | * Prepend hashed base url to the css file |
|