[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_installer/models/fields/ -> group.php (source)

   1  <?php
   2  /**
   3   * @package        Joomla.Administrator
   4   * @subpackage    com_installer
   5   * @copyright    Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   6   * @license        GNU General Public License, see LICENSE.php
   7   */
   8  
   9  // No direct access.
  10  defined('_JEXEC') or die;
  11  
  12  /**
  13   * Form Field Place class.
  14   *
  15   * @package        Joomla.Administrator
  16   * @subpackage    com_installer
  17   * @since        1.6
  18   */
  19  class JFormFieldGroup extends JFormField
  20  {
  21      /**
  22       * The field type.
  23       *
  24       * @var        string
  25       */
  26      protected $type = 'Group';
  27  
  28      /**
  29       * Method to get the field input.
  30       *
  31       * @return    string        The field input.
  32       * @since    1.6
  33       */
  34  	protected function getInput()
  35      {
  36          $onchange    = $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : '';
  37          $options = array();
  38  
  39          foreach ($this->element->children() as $option) {
  40              $options[] = JHtml::_('select.option', (string)$option->attributes()->value, JText::_(trim((string) $option)));
  41          }
  42  
  43          $dbo = JFactory::getDbo();
  44          $query = $dbo->getQuery(true);
  45          $query->select('DISTINCT folder');
  46          $query->from('#__extensions');
  47          $query->where('folder != '.$dbo->quote(''));
  48          $query->order('folder');
  49          $dbo->setQuery((string)$query);
  50          $folders = $dbo->loadColumn();
  51  
  52          foreach($folders as $folder) {
  53              $options[] = JHtml::_('select.option', $folder, $folder);
  54          }
  55  
  56          $return = JHtml::_('select.genericlist', $options, $this->name, $onchange, 'value', 'text', $this->value, $this->id);
  57  
  58          return $return;
  59      }
  60  }


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1