Skip to content

Commit

Permalink
Injected Render class to Social Embed plugin to be compatible with UR…
Browse files Browse the repository at this point in the history
…L Embed new version
  • Loading branch information
vcsvinicius committed Dec 20, 2024
1 parent 40fc344 commit 43f0adc
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Drupal\Component\Uuid\UuidInterface;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Render\Renderer;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\Core\Utility\Error;
Expand Down Expand Up @@ -87,6 +88,8 @@ class SocialEmbedUrlEmbedFilter extends UrlEmbedFilter {
* The logger channel factory service.
* @param \Drupal\Core\Routing\RouteMatchInterface $routeMatch
* The route match service.
* @param \Drupal\Core\Render\Renderer $renderer
* Renderer services.
*/
public function __construct(
array $configuration,
Expand All @@ -99,8 +102,10 @@ public function __construct(
AccountProxyInterface $current_user,
LoggerChannelFactoryInterface $loggerFactory,
protected RouteMatchInterface $routeMatch,
Renderer $renderer,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $url_embed);
parent::__construct($configuration, $plugin_id, $plugin_definition, $url_embed, $renderer);

$this->uuid = $uuid;
$this->configFactory = $config_factory;
$this->embedHelper = $embed_helper;
Expand All @@ -123,6 +128,7 @@ public static function create(ContainerInterface $container, array $configuratio
$container->get('current_user'),
$container->get('logger.factory'),
$container->get('current_route_match'),
$container->get('renderer'),
);
}

Expand Down

0 comments on commit 43f0adc

Please sign in to comment.