CoolFace
Apppublic

kenken999/php

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
advancedsearchcontrol.php29 linesDownload Raw Back to classes
1<?php2 3/**4 * Search control builder class for advanced search5 *6 */7class AdvancedSearchControl extends SearchControl 8{9	function __construct($id, $tName, &$searchClauseObj, &$pageObj) 10	{11		parent::__construct($id, $tName, $searchClauseObj, $pageObj);12		$this->getSrchPanelAttrs['ctrlTypeComboStatus'] = true;13	}14	15	function getCtrlSearchTypeOptions($fName, $selOpt, $not, $flexible = false, $both = false) 16	{17		if( $this->pageObj->isBootstrap() ) 18		{19			if( !$flexible && ($selOpt == EMPTY_SEARCH || $selOpt == NOT_EMPTY) ) 20				return $this->getControl($fName)->buildSearchOptions(array(EMPTY_SEARCH, NOT_EMPTY), $selOpt, $not, true);21				22			return $this->getControl($fName)->getSearchOptions($selOpt, $not, true); 23		}24		25		$withNot = $both ? $not : false;26		return parent::getCtrlSearchTypeOptions($fName, $selOpt, $withNot, false, $both);27	}28}29?>