diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index 8f9dd9a66..70a5ade14 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -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');