CoreFiles by mySites.guru
Select.php44 lines, 1,398 bytes, from Joomla_4.0.0-beta5-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta4
md5
a7fb5f7c65f8a05ca32b9e3db955197b
sha1
5efd7cd9e01b195ded24fc50265510a2d3c5fc7f
sha256
174b8b9766508e834c191cf762fbe3f5b3150c9a95b3167232e037f1e8751d6e
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_joomlaupdate
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Joomlaupdate\Administrator\Helper;

\defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/**
 * Joomla! update selection list helper.
 *
 * @since  2.5.4
 */
class Select
{
	/**
	 * Returns an HTML select element with the different extraction modes
	 *
	 * @param   string  $default  The default value of the select element
	 * @param   string  $name     The name of the form field
	 * @param   string  $id       The id of the select field
	 *
	 * @return  string
	 *
	 * @since   2.5.4
	 */
	public static function getMethods($default = 'hybrid', $name = 'method', $id = 'extraction_method')
	{
		$options = array();
		$options[] = HTMLHelper::_('select.option', 'direct', Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_DIRECT'));
		$options[] = HTMLHelper::_('select.option', 'hybrid', Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_HYBRID'));
		$options[] = HTMLHelper::_('select.option', 'ftp', Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_FTP'));

		return HTMLHelper::_('select.genericlist', $options, $name, 'class="custom-select"', 'value', 'text', $default, $id);
	}
}

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.