@script::getResourceURL

Returns a URL to the specified resource, which must exist on the class path.

Syntax:

@script::getResourceURL(String resourceName)

Parameters:

(string) resourceName: the name of the resource

Returns:

(string) URL to the specified resource.

Example:

In the following example, "resources/ui/logo.gif" is passed in as a resource name and the getResourceURL method returns the URL to the item:

$resourceURL = @script::getResourceURL("resources/ui/logo.gif")

@script::log($resourceURL)

Output:

/opt//opt/xmatters/5//node/assets/resources/ui/logo.gif