You are here

public function SoEmbedFilter::__construct in Simple oEmbed 8.2

Constructs a new OEmbed instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory service.

\Drupal\media\OEmbed\ResourceFetcherInterface $resource_fetcher: The oEmbed resource fetcher service.

\Drupal\media\OEmbed\UrlResolverInterface $url_resolver: The oEmbed URL resolver service.

\Drupal\media\IFrameUrlHelper $iframe_url_helper: The iFrame URL helper service.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

Overrides FilterBase::__construct

File

src/Plugin/Filter/SoEmbedFilter.php, line 101

Class

SoEmbedFilter
Provides a filter to embed media via oEmbed.

Namespace

Drupal\soembed\Plugin\Filter

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, ResourceFetcherInterface $resource_fetcher, UrlResolverInterface $url_resolver, IFrameUrlHelper $iframe_url_helper, RendererInterface $renderer) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->config = $config_factory
    ->get('media.settings');
  $this->logger = $logger_factory
    ->get('media');
  $this->resourceFetcher = $resource_fetcher;
  $this->urlResolver = $url_resolver;
  $this->iFrameUrlHelper = $iframe_url_helper;
  $this->renderer = $renderer;
}