CoreFiles by mySites.guru
helper.php44 lines, 1,029 bytes, from Joomla_3.6.3-Stable-Full_Package.zip
Raw History Compare with 3.6.2
md5
35a7871c778d8b0a5c9c9636e734f8f1
sha1
e905bac38543384ac53b99f3bde52b272008401f
sha256
fad31ec5b8462bb30cbe345f204e32ac045ee818c02a0bb8b63398e4c1b1898f
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_version
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Helper for mod_version
 *
 * @since  1.6
 */
abstract class ModVersionHelper
{
	/**
	 * Get the member items of the submenu.
	 *
	 * @param   \Joomla\Registry\Registry  &$params  The parameters object.
	 *
	 * @return  string  String containing the current Joomla version based on the selected format.
	 */
	public static function getVersion(&$params)
	{
		$version     = new JVersion;
		$versionText = $version->getShortVersion();
		$product     = $params->get('product', 0);

		if ($params->get('format', 'short') === 'long')
		{
			$versionText = str_replace($version::PRODUCT . ' ', '', $version->getLongVersion());
		}

		if (!empty($product))
		{
			$versionText = $version::PRODUCT . ' ' . $versionText;
		}

		return $versionText;
	}
}

The same content is in 28 releases, Joomla 3.5.0-beta3 to 3.7.0-alpha1. See them all, or every version of this file.