You are here

public function UrlToVideoFilterServiceInterface::convertYouTubeUrls in URL to Video Filter 2.0.x

Same name and namespace in other branches
  1. 8 src/Service/UrlToVideoFilterServiceInterface.php \Drupal\url_to_video_filter\Service\UrlToVideoFilterServiceInterface::convertYouTubeUrls()

Converts URLs to embedded YouTube videos.

Parameters

string $text: The text to be parsed for YouTube URLs.

Return value

array An array containing the following keys:

  • text: The text with the URLs replaced by the YouTube embed code
  • url_found: A boolean indicating whether any URLs were found in the given text.
1 method overrides UrlToVideoFilterServiceInterface::convertYouTubeUrls()
UrlToVideoFilterService::convertYouTubeUrls in src/Service/UrlToVideoFilterService.php
Converts URLs to embedded YouTube videos.

File

src/Service/UrlToVideoFilterServiceInterface.php, line 22

Class

UrlToVideoFilterServiceInterface
Interface for the URL To Video service class.

Namespace

Drupal\url_to_video_filter\Service

Code

public function convertYouTubeUrls($text);