Skip to content
Snippets Groups Projects

Issue #3424233 by el7cosmos, daniel-san: Add ability to override twig template in theme

Merged Issue #3424233 by el7cosmos, daniel-san: Add ability to override twig template in theme
Files
2
@@ -74,16 +74,11 @@ class MediaTableauEmbedFormatter extends MediaRemoteFormatterBase {
}
$elements[$delta] = [
'#type' => 'inline_template',
'#template' => '{{ include(template) }}',
'#context' => [
'template' => '@media_tableau/media-tableau.html.twig',
'url' => static::formatUrl($item->value),
'title' => $item->getParent()->getParent()->get('name')->value,
'width' => $this->getSetting('width'),
'height' => $this->getSetting('height'),
],
'#theme' => 'media_tableau',
'#url' => static::formatUrl($item->value),
'#title' => $item->getParent()->getParent()->get('name')->value,
'#width' => $this->getSetting('width'),
'#height' => $this->getSetting('height'),
'#attached' => [
'library' => [
'media_tableau/media_tableau_embedding.' . $this->getSetting('api_version'),
Loading