[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_finder 6 * 7 * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Component\Finder\Administrator\Field; 12 13 use Joomla\CMS\Form\Field\ListField; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Text; 16 17 // phpcs:disable PSR1.Files.SideEffects 18 \defined('_JEXEC') or die; 19 // phpcs:enable PSR1.Files.SideEffects 20 21 /** 22 * Search Filter field for the Finder package. 23 * 24 * @since 2.5 25 */ 26 class SearchfilterField extends ListField 27 { 28 /** 29 * The form field type. 30 * 31 * @var string 32 * @since 2.5 33 */ 34 protected $type = 'SearchFilter'; 35 36 /** 37 * Method to get the field options. 38 * 39 * @return array The field option objects. 40 * 41 * @since 2.5 42 */ 43 public function getOptions() 44 { 45 // Build the query. 46 $db = $this->getDatabase(); 47 $query = $db->getQuery(true) 48 ->select('f.title AS text, f.filter_id AS value') 49 ->from($db->quoteName('#__finder_filters') . ' AS f') 50 ->where('f.state = 1') 51 ->order('f.title ASC'); 52 $db->setQuery($query); 53 $options = $db->loadObjectList(); 54 55 array_unshift($options, HTMLHelper::_('select.option', '', Text::_('COM_FINDER_SELECT_SEARCH_FILTER'), 'value', 'text')); 56 57 return $options; 58 } 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |