| @@ 242-254 (lines=13) @@ | ||
| 239 | * @param array $themes List of themes |
|
| 240 | * @return string Path to resolved CSS file (relative to base dir) |
|
| 241 | */ |
|
| 242 | public function findThemedCSS($name, $themes) |
|
| 243 | { |
|
| 244 | if (substr($name, -4) !== '.css') { |
|
| 245 | $name .= '.css'; |
|
| 246 | } |
|
| 247 | ||
| 248 | $filename = $this->findThemedResource("css/$name", $themes); |
|
| 249 | if ($filename === null) { |
|
| 250 | $filename = $this->findThemedResource($name, $themes); |
|
| 251 | } |
|
| 252 | ||
| 253 | return $filename; |
|
| 254 | } |
|
| 255 | ||
| 256 | /** |
|
| 257 | * Resolve themed javascript path |
|
| @@ 267-279 (lines=13) @@ | ||
| 264 | * @param array $themes List of themes |
|
| 265 | * @return string Path to resolved javascript file (relative to base dir) |
|
| 266 | */ |
|
| 267 | public function findThemedJavascript($name, $themes) |
|
| 268 | { |
|
| 269 | if (substr($name, -3) !== '.js') { |
|
| 270 | $name .= '.js'; |
|
| 271 | } |
|
| 272 | ||
| 273 | $filename = $this->findThemedResource("javascript/$name", $themes); |
|
| 274 | if ($filename === null) { |
|
| 275 | $filename = $this->findThemedResource($name, $themes); |
|
| 276 | } |
|
| 277 | ||
| 278 | return $filename; |
|
| 279 | } |
|
| 280 | ||
| 281 | /** |
|
| 282 | * Resolve a themed resource |
|