silverstripe-framework/_config/asset.yml
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

69 lines
2.0 KiB
YAML

---
Name: coreflysystem
---
SilverStripe\Core\Injector\Injector:
# Define the default adapter for this filesystem
FlysystemPublicAdapter:
class: 'SilverStripe\Assets\Flysystem\PublicAssetAdapter'
# Define the secondary adapter for protected assets
FlysystemProtectedAdapter:
class: 'SilverStripe\Assets\Flysystem\ProtectedAssetAdapter'
# Define the default filesystem
FlysystemPublicBackend:
class: 'League\Flysystem\Filesystem'
constructor:
Adapter: '%$FlysystemPublicAdapter'
Config:
visibility: public
# Define the secondary filesystem for protected assets
FlysystemProtectedBackend:
class: 'League\Flysystem\Filesystem'
constructor:
Adapter: '%$FlysystemProtectedAdapter'
Config:
visibility: private
---
Name: coreassets
After:
- '#coreflysystem'
---
SilverStripe\Core\Injector\Injector:
# Define our SS asset backend
AssetStore:
class: 'SilverStripe\Assets\Flysystem\FlysystemAssetStore'
properties:
PublicFilesystem: '%$FlysystemPublicBackend'
ProtectedFilesystem: '%$FlysystemProtectedBackend'
ProtectedFileController:
class: SilverStripe\Assets\Storage\ProtectedFileController
properties:
RouteHandler: '%$AssetStore'
AssetNameGenerator:
class: SilverStripe\Assets\Storage\DefaultAssetNameGenerator
type: prototype
# Requirements config
GeneratedAssetHandler:
class: SilverStripe\Assets\Flysystem\GeneratedAssetHandler
properties:
Filesystem: '%$FlysystemPublicBackend'
SilverStripe\View\Requirements_Minifier:
class: SilverStripe\View\JSMinifier
SilverStripe\View\Requirements_Backend:
properties:
AssetHandler: '%$GeneratedAssetHandler'
---
Name: coreassetroutes
After:
- '#coreassets'
---
SilverStripe\Control\Director:
rules:
'assets': ProtectedFileController
---
Name: imageconfig
---
SilverStripe\Core\Injector\Injector:
SilverStripe\Assets\Image_Backend:
class: SilverStripe\Assets\GDBackend
Image_Backend: '%$SilverStripe\Assets\Image_Backend'