| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Administrator 4 * @subpackage com_finder 5 * 6 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE 8 */ 9 10 defined('JPATH_BASE') or die(); 11 12 JFormHelper::loadFieldClass('list'); 13 14 /** 15 * Search Filter field for the Finder package. 16 * 17 * @package Joomla.Administrator 18 * @subpackage com_finder 19 * @since 2.5 20 */ 21 class JFormFieldSearchFilter extends JFormFieldList 22 { 23 /** 24 * The form field type. 25 * 26 * @var string 27 * @since 1.7 28 */ 29 protected $type = 'SearchFilter'; 30 31 /** 32 * Method to get the field options. 33 * 34 * @return array The field option objects. 35 * 36 * @since 1.7 37 */ 38 public function getOptions() 39 { 40 // Initialize variables. 41 $options = array(); 42 43 // Build the query. 44 $db = JFactory::getDBO(); 45 $query = $db->getQuery(true); 46 $query->select('f.' . $db->quoteName('title') . ' AS text, f.' . $db->quoteName('filter_id') . ' AS value'); 47 $query->from($db->quoteName('#__finder_filters') . ' AS f'); 48 $query->where('f.' . $db->quoteName('state') . ' = 1'); 49 $query->order('f.title ASC'); 50 $db->setQuery($query); 51 $options = $db->loadObjectList(); 52 53 array_unshift($options, JHtml::_('select.option', '', JText::_('COM_FINDER_SELECT_SEARCH_FILTER'), 'value', 'text')); 54 55 return $options; 56 } 57 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |