You are here

function oembed_render_element in oEmbed 7.0

Same name and namespace in other branches
  1. 8 oembed.module \oembed_render_element()
  2. 7 oembed.module \oembed_render_element()

Prepare an element based on a oEmbed request.

Parameters

$type: Element type.

$url: URL to embed.

$parameters: oEmbed request parameters.

Return value

A renderable array with the following keys and values:

  • #type: The passed-in element $type.
  • #url: The passed-in $url.
  • #parameters: The passed-in $parameters.
6 calls to oembed_render_element()
MediaOembedTestCase::testOembedFileFormatters in ./oembed.test
Tests the oembed render element types.
OembedTestCase::testOembedRenderElements in ./oembed.test
Tests the oembed render element types.
oembed_field_formatter_view in ./oembed.module
Implements hook_field_formatter_view().
oembed_file_formatter_view in ./oembed.module
Implements hook_file_formatter_FORMATTER_view().
oembed_resolve_link in ./oembed.filter.inc
PREG replace callback finds [embed] shortcodes, URLs and request options.

... See full list

File

./oembed.module, line 500

Code

function oembed_render_element($type, $url, $parameters = array()) {
  return array(
    '#type' => $type,
    '#url' => $url,
    '#parameters' => $parameters,
  );
}