function OEmbedResourceConstraintValidator::__construct

Same name in other branches
  1. 9 core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php \Drupal\media\Plugin\Validation\Constraint\OEmbedResourceConstraintValidator::__construct()
  2. 8.9.x core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php \Drupal\media\Plugin\Validation\Constraint\OEmbedResourceConstraintValidator::__construct()
  3. 11.x core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php \Drupal\media\Plugin\Validation\Constraint\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.