Retrieve the URL for a video's comment feed.

@return string|null The URL if found, or null if not found.
199388
public function getVideoCommentFeedUrl()
    {
        $commentsExtension = $this->getComments();
        $commentsFeedUrl = null;
        if ($commentsExtension) {
            $commentsFeedLink = $commentsExtension->getFeedLink();
            if ($commentsFeedLink) {
                $commentsFeedUrl = $commentsFeedLink->getHref();
            }
        }
        return $commentsFeedUrl;
    }
770073
public function getComment()
    {
        $postParameterBag = $this
            ->request
            ->query;
        $commentId = $postParameterBag->get('comment_id');
    
        if (empty($commentId)) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Some query parameters are missing',
            ], 400);
        }

        $commentReference = new CommentUUID($commentId);
        $comment = $this
            ->commentRepository
            ->findComment($commentReference)
            ->getFirstComment();
    
        if (!$comment instanceof Comment) {
            return new JsonResponse([
                'status' => 'Error',
                'message' => 'Comment not found',
            ], 404);
        }
        
    
        return new JsonResponse([
            'comment' => $comment->toArray(),
            'user' => $this->userCredentialsProvider->toArray(),
        ], 200);
    }
867633
public static function get_video_embed_url( $url ) {
		if ( strpos( $url, 'youtube' ) !== false && strpos( $url, 'watch' ) !== false ) {
			$parts = wp_parse_url( $url );

			if ( is_array( $parts ) && isset( $parts['query'] ) ) {
				parse_str( $parts['query'] );
				if ( isset( $v ) ) {
					return 'https://www.youtube.com/embed/' . $v;
				}
			}
		}

		if ( strpos( $url, 'vimeo' ) !== false && strpos( $url, 'player' ) === false ) {
			$parts = wp_parse_url( $url );

			if ( is_array( $parts ) && isset( $parts['path'] ) ) {
				return 'https://player.vimeo.com/video' . $parts['path'];
			}
		}

		return $url;
	}
559711
public function getVideoFeed($location = null)
    {
        if ($location == null) {
            $uri = self::VIDEO_URI;
        } else if ($location instanceof Zend_Gdata_Query) {
            $uri = $location->getQueryUrl($this->getMajorProtocolVersion());
        } else {
            $uri = $location;
        }
        return parent::getFeed($uri, 'Zend_Gdata_YouTube_VideoFeed');
    }
1318668
public function getVideoTitle()
    {
        $url = trim($this->value);
        return VideoLink::create()->setValue($url)->Title;
    }
1106076
protected function _getYoutubeHtml()
    {
        $sUrl = $this->oxmediaurls__oxurl->value;
        $sDesc = $this->oxmediaurls__oxdesc->value;

        if (strpos($sUrl, 'youtube.com')) {
            $sYoutubeUrl = str_replace("www.youtube.com/watch?v=", "www.youtube.com/embed/", $sUrl);
            $sYoutubeUrl = preg_replace('/&amp;/', '?', $sYoutubeUrl, 1);
        }
        if (strpos($sUrl, 'youtu.be')) {
            $sYoutubeUrl = str_replace("youtu.be/", "www.youtube.com/embed/", $sUrl);
        }

        $sYoutubeTemplate = '%s<br><iframe width="425" height="344" src="%s" frameborder="0" allowfullscreen></iframe>';
        $sYoutubeHtml = sprintf($sYoutubeTemplate, $sDesc, $sYoutubeUrl, $sYoutubeUrl);

        return $sYoutubeHtml;
    }
974215
public function getUrl()
    {
        if($this->storage)
        {
            $this->save();

            return $this->storage->getUrl($this);
        }

        return NULL;
    }
655684
public function get_url() {
        if ($this->other['forumtype'] == 'single') {
            // Single discussion forums are an exception. We show
            // the forum itself since it only has one discussion
            // thread.
            $url = new \moodle_url('/mod/forum/view.php', array('f' => $this->other['forumid']));
        } else {
            $url = new \moodle_url('/mod/forum/discuss.php', array('d' => $this->other['discussionid']));
        }
        $url->set_anchor('p'.$this->objectid);
        return $url;
    }
241640
public function getImageUrl()
    {
        if(array_key_exists(self::ITEM_IMAGE_URL, $this->_itemData)) {
            return (string) $this->_itemData[self::ITEM_IMAGE_URL];
        }
        return null;
    }
735281
public function getQueryUrl($majorProtocolVersion = null,
        $minorProtocolVersion = null)
    {
        if (isset($this->_url)) {
            $url = $this->_url;
        } else {
            $url = Zend_Gdata_YouTube::VIDEO_URI;
        }
        if ($this->getCategory() !== null) {
            $url .= '/-/' . $this->getCategory();
        }
        $url = $url . $this->getQueryString($majorProtocolVersion,
            $minorProtocolVersion);
        return $url;
    }
921033
public function getComment()
    {
        if (!$this->_commentFetched) {
            $this->_comment = $this->_fetchComment();
            $this->_commentFetched = true;
        }
        return $this->_comment;
    }
1344467
public function get_url() {
        if ($this->other['forumtype'] == 'single') {
            // Single discussion forums are an exception. We show
            // the forum itself since it only has one discussion
            // thread.
            $url = new \moodle_url('/mod/forum/view.php', array('f' => $this->other['forumid']));
        } else {
            $url = new \moodle_url('/mod/forum/discuss.php', array('d' => $this->other['discussionid']));
        }
        return $url;
    }
1112197
public function getComment()
    {
        if ($this->comment === null) {
            $match = [];
            preg_match(self::$REGEX_COMMENT, $this->output, $match);
            $this->comment = array_key_exists(2, $match) ? trim($match[2]) : '';
        }

        return $this->comment;
    }
1168528
public function getUrl()
    {
        // Ensure in request cycle (even for override).
        if ($this->request === null) {
            return null;
        }

        // Ensure request has been matched
        if (!$this->request->attributes->get('_route')) {
            return null;
        }

        if ($this->override) {
            $this->resolveCurrentOverride();

            return (string) $this->override;
        }

        return $this->urlGenerator->generate(
            $this->request->attributes->get('_route'),
            $this->request->attributes->get('_route_params'),
            UrlGeneratorInterface::ABSOLUTE_URL
        );
    }
100063
public function getUrlAttribute()
    {
        if ($this->disk == 'public') {
            return url($this->storage->url($this->path));
        }

        return config('media.download', false) ? url(str_finish(config('media.download'), '/') . $this->id) : null;
    }
412010
private function url()
    {
        if (isset($this->_options[self::ENTRY_BASEURL])) {
            return $this->_options[self::ENTRY_BASEURL];
        }

        // this is the fallback
        return Urls::URL_CURSOR;
    }
151545
public function getUrl()
    {
        $path = $this->getPublicPath();

        $url = $this->getDiskConfig('url');

        if ($url) {
            if ($this->isInWebroot()) {
                $path = $this->media->getDiskPath();
            }

            return rtrim($url, '/').'/'.trim($path, '/');
        }

        return $this->url->asset($path);
    }