You are here

public function OEmbedProcessor::__construct in Gutenberg 8.2

OEmbedProcessor constructor.

Parameters

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Drupal\gutenberg\OEmbedResolverInterface $oembed_resolver: The oEmbed resolver.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: (optional) The cache backend.

File

src/BlockProcessor/OEmbedProcessor.php, line 72

Class

OEmbedProcessor
Processes oEmbed blocks.

Namespace

Drupal\gutenberg\BlockProcessor

Code

public function __construct(RendererInterface $renderer, ModuleHandlerInterface $module_handler, TimeInterface $time, OEmbedResolverInterface $oembed_resolver, CacheBackendInterface $cache_backend = NULL) {
  $this->renderer = $renderer;
  $this->moduleHandler = $module_handler;
  $this->time = $time;
  $this->oembedResolver = $oembed_resolver;
  $this->cacheBackend = $cache_backend;
  $this->useCaches = isset($cache_backend);
}