class EmbedShortcodeProvider implements ShortcodeHandler (View source)

Provider for the [embed] shortcode tag used by the embedding service in the HTML Editor field.

Provides the html needed for the frontend and the editor field itself.

Traits

Provides extensions to this object to integrate it with standard config API methods.

Methods

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public static 
mixed
get_shortcodes()

Gets the list of shortcodes provided by this handler

public static 
string
handle_shortcode(array $arguments, string $content, ShortcodeParser $parser, string $shortcode, array $extra = [])

Embed shortcode parser from Oembed. This is a temporary workaround.

public static 
string
embeddableToHtml(Embeddable $embeddable, array $arguments)

No description

protected static 
string
videoEmbed(array $arguments, string $content)

Build video embed tag

protected static 
string
linkEmbed(array $arguments, string $href, string $title)

Build embed tag

protected static 
string
photoEmbed(array $arguments, string $src)

Build img embed tag

public static 
void
flushCachedShortcodes(ShortcodeParser $parser, string $content)

No description

Details

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

static mixed get_shortcodes()

Gets the list of shortcodes provided by this handler

Return Value

mixed

static string handle_shortcode(array $arguments, string $content, ShortcodeParser $parser, string $shortcode, array $extra = [])

Embed shortcode parser from Oembed. This is a temporary workaround.

Oembed class has been replaced with the Embed external service.

Parameters

array $arguments

Arguments passed to the parser

string $content

Raw shortcode

ShortcodeParser $parser Parser
string $shortcode

Name of shortcode used to register this handler

array $extra

Extra arguments

Return Value

string

Result of the handled shortcode

static string embeddableToHtml(Embeddable $embeddable, array $arguments)

No description

Parameters

Embeddable $embeddable
array $arguments

Return Value

string

static protected string videoEmbed(array $arguments, string $content)

Build video embed tag

Parameters

array $arguments
string $content

Raw HTML content

Return Value

string

static protected string linkEmbed(array $arguments, string $href, string $title)

static protected string photoEmbed(array $arguments, string $src)

Build img embed tag

Parameters

array $arguments
string $src

Return Value

string

static void flushCachedShortcodes(ShortcodeParser $parser, string $content)

No description

Parameters

ShortcodeParser $parser
string $content

Return Value

void