Skip to content
Snippets Groups Projects

Edit ViewsShareController.php

1 file
+ 7
4
Compare changes
  • Side-by-side
  • Inline
@@ -378,11 +378,14 @@ class ViewsShareController extends ControllerBase {
$base_url = $this->requestStack->getCurrentRequest()->getSchemeAndHttpHost();
$query = $this->requestStack->getCurrentRequest()->query->all();
$width = (int) $handler_options['embed_width'] ?? 600;
$height = (int) $handler_options['embed_height'] ?? 400;
$oembed_data = [
'version' => '1.0',
'type' => 'rich',
'width' => $handler_options['embed_width'] ?? 600,
'height' => $handler_options['embed_height'] ?? 400,
'width' => $width,
'height' => $height,
'title' => $view->getTitle(),
'url' => ViewsShareHelper::getEmbedUrl($view, $query, TRUE, TRUE),
'provider_name' => $this->config('system.site')->get('name'),
@@ -390,8 +393,8 @@ class ViewsShareController extends ControllerBase {
'html' => ViewsShareHelper::getEmbedCode(
$view,
$query,
(int) ($handler_options['embed_width'] ?? 600),
(int) ($handler_options['embed_height'] ?? 400),
$width,
$height,
$handler_options['embed_style'] ?? ''
),
];
Loading