function OEmbedResourceConstraintValidator::__construct

Constructs a new OEmbedResourceConstraintValidator.

Parameters

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

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

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

File

core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php, line 56

Class

OEmbedResourceConstraintValidator
Validates oEmbed resource URLs.

Namespace

Drupal\media\Plugin\Validation\Constraint

Code

public function __construct(UrlResolverInterface $url_resolver, ResourceFetcherInterface $resource_fetcher, LoggerChannelFactoryInterface $logger_factory) {
  $this->urlResolver = $url_resolver;
  $this->resourceFetcher = $resource_fetcher;
  $this->logger = $logger_factory->get('media');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.