news-bundle/src/Resources/contao/modules/ModuleNews.php
protected function generateLink($strLink, $objArticle, $blnAddArchive=false, $blnIsReadMore=false)
	{
		// Internal link
		if ($objArticle->source != 'external')
		{
			return sprintf('<a href="%s" title="%s" itemprop="url"><span itemprop="headline">%s</span>%s</a>',
							News::generateNewsUrl($objArticle, $blnAddArchive),
							StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['readMore'], $objArticle->headline), true),
							$strLink,
							($blnIsReadMore ? '<span class="invisible"> '.$objArticle->headline.'</span>' : ''));
		}

		// Encode e-mail addresses
		if (substr($objArticle->url, 0, 7) == 'mailto:')
		{
			$strArticleUrl = StringUtil::encodeEmail($objArticle->url);
		}

		// Ampersand URIs
		else
		{
			$strArticleUrl = ampersand($objArticle->url);
		}

		// External link
		return sprintf('<a href="%s" title="%s"%s itemprop="url"><span itemprop="headline">%s</span></a>',
						$strArticleUrl,
						StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['open'], $strArticleUrl)),
						($objArticle->target ? ' target="_blank"' : ''),
						$strLink);
	}
protected function generateLink($strLink, $objArticle, $blnAddArchive=false, $blnIsReadMore=false)
	{
		// Internal link
		if ($objArticle->source != 'external')
		{
			return sprintf('<a href="%s" title="%s" itemprop="url"><span itemprop="headline">%s</span>%s</a>',
							News::generateNewsUrl($objArticle, $blnAddArchive),
							StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['readMore'], $objArticle->headline), true),
							$strLink,
							($blnIsReadMore ? '<span class="invisible"> '.$objArticle->headline.'</span>' : ''));
		}

		// Encode e-mail addresses
		if (substr($objArticle->url, 0, 7) == 'mailto:')
		{
			$strArticleUrl = StringUtil::encodeEmail($objArticle->url);
		}

		// Ampersand URIs
		else
		{
			$strArticleUrl = ampersand($objArticle->url);
		}

		// External link
		return sprintf('<a href="%s" title="%s"%s itemprop="url"><span itemprop="headline">%s</span></a>',
						$strArticleUrl,
						StringUtil::specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['open'], $strArticleUrl)),
						($objArticle->target ? ' target="_blank"' : ''),
						$strLink);
	}
Generate a link and return it as string

@param string    $strLink
@param NewsModel $objArticle
@param boolean   $blnAddArchive
@param boolean   $blnIsReadMore

@return string