mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOC Add example for using resource location for pages / modeladmin
This commit is contained in:
parent
3e9dc5c7d2
commit
97dfd9ac47
@ -300,6 +300,20 @@ $themesFilePath = ThemeResourceLoader::inst()->findThemedResource('css/styles.cs
|
||||
$themeFolderPath = ThemeResourceLoader::inst()->getPath('simple');
|
||||
```
|
||||
|
||||
Usage for Page and ModelAdmin:
|
||||
|
||||
```php
|
||||
class ListingPage extends \Page {
|
||||
private static $icon = 'mycompany/silverstripe-mymodule: client/images/sitetree_icon.png';
|
||||
}
|
||||
```
|
||||
|
||||
```php
|
||||
class MyCustomModelAdmin extends \SilverStripe\Admin\ModelAdmin {
|
||||
private static $menu_icon = 'mycompany/silverstripe-mymodule: client/images/modeladmin_icon.png';
|
||||
}
|
||||
```
|
||||
|
||||
To ensure consistency, we've also deprecated support for path constants:
|
||||
|
||||
* `FRAMEWORK_DIR` and `FRAMEWORK_PATH`
|
||||
|
Loading…
Reference in New Issue
Block a user