mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS fix 4.0.0 changelog example code
ThemeResourceLoader::inst()->findThemedResource() requires two arguments af2c3886b9/src/View/ThemeResourceLoader.php (L286-L294)
This commit is contained in:
parent
0bec6e07dc
commit
cab1ea0dbe
@ -484,6 +484,7 @@ Usage with custom logic:
|
||||
```diff
|
||||
+use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
+use SilverStripe\View\ThemeResourceLoader;
|
||||
+use SilverStripe\View\SSViewer;
|
||||
|
||||
-$moduleFilePath = FRAMEWORK_DIR . '/MyFile.php';
|
||||
+$moduleFilePath = ModuleLoader::getModule('silverstripe/framework')->getResource('MyFile.php')->getRelativePath();
|
||||
@ -495,7 +496,8 @@ Usage with custom logic:
|
||||
+$mysiteFilePath = ModuleLoader::getModule('mysite')->getResource('css/styles.css')->getRelativePath();
|
||||
|
||||
-$themesFilePath = SSViewer::get_theme_folder() . '/css/styles.css';
|
||||
+$themesFilePath = ThemeResourceLoader::inst()->findThemedResource('css/styles.css');
|
||||
+$themes = SSViewer::get_themes();
|
||||
+$themesFilePath = ThemeResourceLoader::inst()->findThemedResource('css/styles.css', $themes);
|
||||
|
||||
-$themeFolderPath = THEMES_DIR . '/simple';
|
||||
+$themeFolderPath = ThemeResourceLoader::inst()->getPath('simple');
|
||||
|
Loading…
Reference in New Issue
Block a user