\LazySizesImageExtension
LazySizesImageExtension
- Author: lekoala
Synopsis
class LazySizesImageExtension
extends DataExtension
{
- // members
- protected static $_responsiveSetsCache = NULL;
- protected static Config_ForClass $_configCache = NULL;
- // methods
- public static Config_ForClass config()
- public SSViewer __call()
- protected SSViewer createResponsiveSet()
- protected array getConfigForSet()
- protected array getResponsiveSets()
- public static array parseDimensions()
- public array allMethodNames()
- public string srcset()
Hierarchy
Extends
- DataExtension
Members
protected
- $_configCache — Config_ForClass
- $_responsiveSetsCache — array
Methods
protected
- createResponsiveSet() — Requires the necessary JS and sends the required HTML structure to the template for a responsive image set
- getConfigForSet() — Look for the config in the responsiveSetsCache array
- getResponsiveSets() — An accessor for $_responsiveSetsCache. Stores cache if not set
public
- __call() — A wildcard method for handling responsive sets as template functions, e.g. $MyImage.ResponsiveSet1
- allMethodNames() — Defines all the methods that can be called in this class
- config() — Config accessor
- parseDimensions() — Parses a string such as "400" or "400x600" and returns width and height values
- srcset() — Helper method to return a src set