Heyday\HashPath\HashPathExtension
Class HashPathExtension
Synopsis
class HashPathExtension
extends Extension
{
- // members
- protected static string $format = '%s/%s.v%s.%s';
- protected static boolean $relativeLinks = false;
- // methods
- public static void setFormat()
- public static void setRelativeLinks()
- public string HashFile()
- public string HashPath()
- protected string getPath()
Hierarchy
Extends
- SilverStripe\Core\Extension
Members
protected
- $format
—
string
The format of the web path - $relativeLinks
—
boolean
Whether or not to output links as relative
Methods
protected
- getPath() — Returns the absolute path to a file based on whether or not the input is relative to the current theme
public
- HashFile() — Returns an md5 hash of a file
- HashPath() — Template function to return new web path to asset which includes md5 hash
- setFormat() — Set the format for use in producing the web path
- setRelativeLinks() — Output links as relative