CoreFiles by mySites.guru
helper.php44 lines, 845 bytes, from Joomla_3.8.13-Stable-Full_Package.zip
Raw History Compare with 3.8.12
md5
61b800fe94c49acb4bbe08cb9c45c40d
sha1
b08bc763dc4b192b5d35cac84a1ff23b8e9b8897
sha256
ca00f8f82e47d8855b4607065d386d34594e0600592a76aed09dfe2039853c4d
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_syndicate
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

/**
 * Helper for mod_syndicate
 *
 * @since  1.5
 */
class ModSyndicateHelper
{
	/**
	 * Gets the link
	 *
	 * @param   \Joomla\Registry\Registry  &$params  module parameters
	 *
	 * @return  array  The link as a string
	 *
	 * @since   1.5
	 */
	public static function getLink(&$params)
	{
		$document = JFactory::getDocument();

		foreach ($document->_links as $link => $value)
		{
			$value = ArrayHelper::toString($value);

			if (strpos($value, 'application/' . $params->get('format') . '+xml'))
			{
				return $link;
			}
		}
	}
}

The same content is in 29 releases, Joomla 3.8.4-rc to 3.9.1. See them all, or every version of this file.