Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
cachehandler.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 list of available cache handlers
17  *
18  * @package Joomla.Platform
19  * @subpackage Form
20  * @see JCache
21  * @since 11.1
22  */
24 {
25  /**
26  * The form field type.
27  *
28  * @var string
29  * @since 11.1
30  */
31  protected $type = 'CacheHandler';
32 
33  /**
34  * Method to get the field options.
35  *
36  * @return array The field option objects.
37  *
38  * @since 11.1
39  */
40  protected function getOptions()
41  {
42  $options = array();
43 
44  // Convert to name => name array.
45  foreach (JCache::getStores() as $store)
46  {
47  $options[] = JHtml::_('select.option', $store, JText::_('JLIB_FORM_VALUE_CACHE_' . $store), 'value', 'text');
48  }
49 
50  $options = array_merge(parent::getOptions(), $options);
51 
52  return $options;
53  }
54 }