Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

SearchUtil Class Reference

Static Public Member Functions

static resolveSearchAttributesFromArray ($getArrayName, $formModelClassName, $sourceData)
static resolveAnyMixedAttributesScopeForSearchModelFromArray ($searchModel, $getArrayName, $sourceData)
static resolveSelectedListAttributesForSearchModelFromArray ($searchModel, $getArrayName, $sourceData)
static resolveSortFromStickyData ($getArrayPrefixName, $uniqueLayoutId)
static resolveSearchFormByStickyFilterByStarredData (array $getData, SearchForm $searchForm, $stickyData)
static resolveSearchFormByStickyFilteredByData (array $getData, SearchForm $searchForm, $stickyData)
static resolveSortAttributeFromArray ($getArrayPrefixName, $sourceData)
static resolveSortDescendingFromArray ($getArrayPrefixName, $sourceData)
static resolveFilterByStarredFromArray ($searchModel, $getArrayName, $sourceData)
static resolveFilteredByFromArray ($searchModel, $getArrayName, $sourceData)
static getSortAttributeFromSortString ($sortString)
static isSortDescending ($sortString)
static getSearchAttributesFromSearchArray ($searchArray)
static getSearchAttributesFromSearchArrayForSavingExistingSearchCriteria ($searchArray)
static adaptSearchAttributesToSetInRedBeanModel ($searchAttributes, $model)
static getDynamicSearchAttributesFromArray ($getArrayName, $sourceData)
static sanitizeDynamicSearchAttributesByDesignerTypeForSavingModel (DynamicSearchForm $searchModel, $dynamicSearchAttributes)
static resolveModelToUseByModelAndAttributeName ($model, $attributeName)
static getDynamicSearchStructureFromArray ($getArrayName, $sourceData)
static getFilterByStarredFromArray ($getArrayName, $sourceData)
static getFilteredByFromArray ($getArrayName, $sourceData)

Static Protected Member Functions

static processDynamicSearchAttributesDataForSavingModelRecursively ($searchModel, &$searchAttributeData)

Detailed Description

Helper functionality to convert POST/GET search information into variables and arrays that the RedBeanDataProvider will accept.

Definition at line 42 of file SearchUtil.php.


Member Function Documentation

static resolveSearchAttributesFromArray ( getArrayName,
formModelClassName,
sourceData 
) [static]

Get the search attributes array by resolving the GET array for the information. Remove any attributes from the array that are not searchable form attributes

Parameters:
string $getArrayName
string $formModelClassName
Array $sourceData
Returns:
array

Definition at line 52 of file SearchUtil.php.

static resolveAnyMixedAttributesScopeForSearchModelFromArray ( searchModel,
getArrayName,
sourceData 
) [static]

From the get array, if the anyMixedAttributeScope variable is present, retrieve and set into the $searchModel. If the value is 'All', then set into the SearchModel a value of null since this means there is no scoping.

Parameters:
object $searchModel
string $getArrayName
$sourceData 

Definition at line 80 of file SearchUtil.php.

static resolveSelectedListAttributesForSearchModelFromArray ( searchModel,
getArrayName,
sourceData 
) [static]

From the get array, if the selectedListAttributes variable is present, retrieve and set into the $searchModel.

Parameters:
object $searchModel
string $getArrayName
$sourceData 

Definition at line 111 of file SearchUtil.php.

static resolveSortAttributeFromArray ( getArrayPrefixName,
sourceData 
) [static]

Get the sort attribute array by resolving the array for the information.

Parameters:
$getArrayPrefixName 
Array $sourceData
Returns:
null

Definition at line 173 of file SearchUtil.php.

static resolveSortDescendingFromArray ( getArrayPrefixName,
sourceData 
) [static]

Get the sort descending array by resolving the array for the information.

Parameters:
$getArrayPrefixName 
Array $sourceData
Returns:
bool|null

Definition at line 190 of file SearchUtil.php.

static resolveFilterByStarredFromArray ( searchModel,
getArrayName,
sourceData 
) [static]
Parameters:
$searchModel 
Array $getArrayName
$sourceData 

Definition at line 209 of file SearchUtil.php.

static getSortAttributeFromSortString ( sortString  )  [static]

Convert incoming sort array into the sortAttribute part Examples: 'name.desc' 'officeFax'

Definition at line 231 of file SearchUtil.php.

static isSortDescending ( sortString  )  [static]

Find out if the sort should be descending

Definition at line 248 of file SearchUtil.php.

static getSearchAttributesFromSearchArray ( searchArray  )  [static]

Convert search array into RedBeanDataProvider ready array. Primary purpose is to set null any 'empty', but set element in the array.

Definition at line 266 of file SearchUtil.php.

static getSearchAttributesFromSearchArrayForSavingExistingSearchCriteria ( searchArray  )  [static]

Convert search array into a savable array of searchAttributes. If you want to resolve search attributes to be used in the RedBeanDataProvider then use

See also:
getSearchAttributesFromSearchArray array. Primary purpose is to set null any 'empty', except for '0' values as '0' values mean that 'No' was specfically specified for a boolean value for example.

Definition at line 342 of file SearchUtil.php.

static getDynamicSearchAttributesFromArray ( getArrayName,
sourceData 
) [static]
Parameters:
string $getArrayName
Array $sourceData
Returns:
mixed

Definition at line 404 of file SearchUtil.php.

static sanitizeDynamicSearchAttributesByDesignerTypeForSavingModel ( DynamicSearchForm searchModel,
dynamicSearchAttributes 
) [static]
Parameters:
object DynamicSearchForm $searchModel
array $dynamicSearchAttributes

Definition at line 430 of file SearchUtil.php.

static resolveModelToUseByModelAndAttributeName ( model,
attributeName 
) [static]

Given a model and an attribute that is a relation, ascertain the correct model to use. If a search form model is available then use that otherwise use the appropriate related model.

Parameters:
object $model SearchForm or RedBeanModel
string $attributeName

Definition at line 481 of file SearchUtil.php.

static getDynamicSearchStructureFromArray ( getArrayName,
sourceData 
) [static]
Parameters:
string $getArrayName
Array $sourceData
Returns:

Definition at line 503 of file SearchUtil.php.

static getFilterByStarredFromArray ( getArrayName,
sourceData 
) [static]
Parameters:
string $getArrayName
Array $sourceData
Returns:
mixed

Definition at line 518 of file SearchUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Jan 22 07:10:28 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8