SilverStripe\Assets\Shortcodes\ImageShortcodeProvider
Class ImageShortcodeProvider
Synopsis
class ImageShortcodeProvider
extends FileShortcodeProvider
implements
ShortcodeHandler,Flushable
{
- // methods
- public static mixed get_shortcodes()
- public static string handle_shortcode()
- public static string regenerate_shortcode()
- public static string regenerate_html_links()
- public static CacheInterface getCache()
- protected static void find_error_record()
- private static array updateLoadingValue()
- // Inherited methods from FileShortcodeProvider
- public static mixed get_shortcodes()
- public static string handle_shortcode()
- public static File|null find_shortcode_record()
- protected static File|SiteTree find_error_record()
- public static string getCacheKey()
- public static CacheInterface getCache()
- public static void flush()
Hierarchy
Extends
Implements
- SilverStripe\View\Parsers\ShortcodeHandler
- SilverStripe\Core\Flushable
Methods
private
- updateLoadingValue() — Updated the loading attribute which is used to either lazy-load or eager-load images Eager-load is the default browser behaviour so when eager loading is specified, the loading attribute is omitted
protected
public
- getCache() — Gets the cache used by this provider
- get_shortcodes() — Gets the list of shortcodes provided by this handler
- handle_shortcode() — Replace"[image id=n]" shortcode with an image reference.
- regenerate_html_links() — Helper method to regenerate all shortcode links.
- regenerate_shortcode() — Regenerates "[image id=n]" shortcode with new src attribute prior to being edited within the CMS.
Inherited from SilverStripe\Assets\Shortcodes\FileShortcodeProvider
protected
- find_error_record() — Given a HTTP Error, find an appropriate substitute File or SiteTree data object instance.
public
- find_shortcode_record() — Find the record to use for a given shortcode.
- flush()
- getCache() — Gets the cache used by this provider
- getCacheKey() — Generates a cachekey with the given parameters
- get_shortcodes() — Gets the list of shortcodes provided by this handler
- handle_shortcode() — Replace "[file_link id=n]" shortcode with an anchor tag or link to the file.