function oembed_render_element in oEmbed 8
Same name and namespace in other branches
- 7 oembed.module \oembed_render_element()
- 7.0 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
array 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.
3 calls to oembed_render_element()
- OembedTestCase::testOembedRenderElements in ./
oembed.test - Tests the oembed render element types.
- oembed_file_formatter_view in ./
oembed.module - Implements hook_file_formatter_FORMATTER_view().
- SandboxForm::validateForm in src/
Form/ SandboxForm.php - Form validation handler.
File
- ./
oembed.module, line 137 - Core functionality for oEmbed
Code
function oembed_render_element($type, $url, $parameters = array()) {
return array(
'#type' => $type,
'#url' => $url,
'#parameters' => $parameters,
);
}