Fractas\ShortcodableCodes\InstagramShortcode
Synopsis
class InstagramShortcode
extends ViewableData
{
- // constants
- const API_URL = 'https://api.instagram.com/oembed';
- // members
- private static string $singular_name = 'Instagram Shortcode';
- private static string $plural_name = 'Instagram Shortcodes';
- // methods
- public mixed singular_name()
- public static string parse_shortcode()
- public Fieldlist getShortcodeFields()
- public string getShortcodePlaceHolder()
Hierarchy
Extends
- SilverStripe\View\ViewableData
Constants
Name | Value |
---|---|
API_URL | 'https://api.instagram.com/oembed' |
Members
private
- $plural_name
- $singular_name
Methods
public
- getShortcodeFields() — Returns a list of fields for editing the shortcode's attributes in the insert shortcode popup window.
- getShortcodePlaceHolder() — Returns a link to an image to be displayed as a placeholder in the editor In this example we make easy work of this task by using the placehold.it service But you could also return a link to an image in the filesystem - perharps the first image in this InstagramShortcode a placeholder.
- parse_shortcode() — Parse the shortcode and render as a string, probably with a template.
- singular_name()