class SimpleResourceURLGenerator implements ResourceURLGenerator

Generate URLs assuming that BASE_PATH is also the webroot Standard SilverStripe 3 operation

Config options

url_rewrites array Rewrites applied after generating url.

Methods

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

Details

at line 39
getNonceStyle()

at line 51
setNonceStyle($nonceStyle)

Parameters

$nonceStyle

at line 67
string urlForResource(string|ModuleResource $relativePath)

Return the URL for a resource, prefixing with Director::baseURL() and suffixing with a nonce

Parameters

string|ModuleResource $relativePath File or directory path relative to BASE_PATH

Return Value

string URL, either domain-relative (starting with /) or absolute

Exceptions

InvalidArgumentException If the resource doesn't exist