public function OEmbedResourceConstraintValidator::__construct in Drupal 8
Same name and namespace in other branches
- 9 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\ConstraintCode
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');
}