Codem\Thumbor\ThumboredImage
Represents our 'image' that is returned to templates, in reality it's just going to be used to return the Thumbor Server URL Some methods are provided here to provide a semblance of compatibility with \Image_Cached but you really want to call those on the original \Image
Synopsis
class ThumboredImage
extends ViewableData
{
- // members
- private $url;
- // methods
- public void __construct()
- public string forTemplate()
- public void XML_val()
- public void __toString()
- private void getAltAttribute()
- public string getTag()
- public bool exists()
- public false requireTable()
- public void write()
- public void getFilename()
- public void getExtension()
- public string getURL()
- public string getAbsoluteURL()
- public void getFullPath()
- public void getRelativePath()
- public string Link()
- public string RelativeLink()
- public string AbsoluteLink()
Hierarchy
Extends
- SilverStripe\View\ViewableData
Tasks
Line | Task |
---|---|
9+ | possibly return picture tag, srcset stuff maybe |
58+ | support other attributes |
Members
private
- $url
Methods
private
- getAltAttribute() — Return the alt attr for the <img>
public
- __construct()
- AbsoluteLink() — Just an alias function to keep a consistent API with SiteTree
- Link() — Just an alias function to keep a consistent API with SiteTree
- RelativeLink() — Just an alias function to keep a consistent API with SiteTree
- XML_val() — Get the string value of a field on this object that has been suitable escaped to be inserted directly into a template.
- __toString()
- exists() — At this point, the image exists
- forTemplate() — Return an HTML img tag for this Image.
- getAbsoluteURL() — Gets the absolute URL (which is the just the URL)
- getExtension() — Returns the file extension
- getFilename()
- getFullPath() — Does not exist in this context as this resulting transformed image exists at the Thumbor Server
- getRelativePath()
- getTag() — Return an HTML img tag for this Image
- getURL() — Gets the image URL
- requireTable() — Prevent creating new tables for the cached record
- write() — Prevent writing the cached image to the database