CoreFiles by mySites.guru
SessionhandlerField.php56 lines, 1,242 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
5608d032b9e7021687bf3c630dcf1dd6
sha1
eb02a015152ee442cb5bdd3e95b16449a10666ce
sha256
9bc7b41e471f2ad81e46ffe5936a228f3783a05cee2976127bd209489ed89423
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Form\Field;

defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Form\FormHelper;
use Joomla\Session\Session;

FormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides a select list of session handler options.
 *
 * @since  11.1
 */
class SessionhandlerField extends \JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  11.1
	 */
	protected $type = 'Sessionhandler';

	/**
	 * Method to get the session handler field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   11.1
	 */
	protected function getOptions()
	{
		$options = array();

		// Get the options from the session object.
		foreach (Session::getHandlers() as $store)
		{
			$options[] = \JHtml::_('select.option', strtolower($store), \JText::_('JLIB_FORM_VALUE_SESSION_' . $store), 'value', 'text');
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}

No other release has this exact content. See every version of this file.