Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
sessionhandler.php
Aller à la documentation de ce fichier.
1 <?php
2 /**
3  * @package Joomla.Platform
4  * @subpackage Form
5  *
6  * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
7  * @license GNU General Public License version 2 or later; see LICENSE
8  */
9 
10 defined('JPATH_PLATFORM') or die;
11 
12 JFormHelper::loadFieldClass('list');
13 
14 /**
15  * Form Field class for the Joomla Platform.
16  * Provides a select list of session handler options.
17  *
18  * @package Joomla.Platform
19  * @subpackage Form
20  * @since 11.1
21  */
23 {
24  /**
25  * The form field type.
26  *
27  * @var string
28  * @since 11.1
29  */
30  protected $type = 'SessionHandler';
31 
32  /**
33  * Method to get the session handler field options.
34  *
35  * @return array The field option objects.
36  *
37  * @since 11.1
38  */
39  protected function getOptions()
40  {
41  $options = array();
42 
43  // Get the options from JSession.
44  foreach (JSession::getStores() as $store)
45  {
46  $options[] = JHtml::_('select.option', $store, JText::_('JLIB_FORM_VALUE_SESSION_' . $store), 'value', 'text');
47  }
48 
49  // Merge any additional options in the XML definition.
50  $options = array_merge(parent::getOptions(), $options);
51 
52  return $options;
53  }
54 }