SimpleResourceURLGenerator
class SimpleResourceURLGenerator implements ResourceURLGenerator (View source)
Generate URLs assuming that BASE_PATH is also the webroot Standard SilverStripe 3 operation
Properties
Methods
Return the URL for a resource, prefixing with Director::baseURL() and suffixing with a nonce
Determine if the requested $relativePath requires a public-only resource.
Resolve a resource that may either exist in a public/ folder, or be exposed from the base path to public/_resources/
Details
getNonceStyle()
No description
setNonceStyle($nonceStyle)
No description
string
urlForResource(string|ModuleResource $relativePath)
Return the URL for a resource, prefixing with Director::baseURL() and suffixing with a nonce
protected array
resolveModuleResource(ModuleResource $resource)
Update relative path for a module resource
protected bool
inferPublicResourceRequired(string $relativePath)
Determine if the requested $relativePath requires a public-only resource.
An error will occur if this file isn't immediately available in the public/ assets folder.
protected array
resolvePublicResource(string $relativePath)
Resolve a resource that may either exist in a public/ folder, or be exposed from the base path to public/_resources/