UNA
Loading...
Searching...
No Matches
BxDolSearchResult Class Reference
Inheritance diagram for BxDolSearchResult:
iBxDolReplaceable BxBaseSearchResult BxTemplSearchResult BxTemplSearchResult BxBaseModGeneralSearchResult BxBasePagesSearchResult BxBaseProfileSearchResult BxBaseModGeneralSearchResult BxBasePagesSearchResult BxBaseProfileSearchResult BxAccntSearchResult BxBaseModGeneralCmtsSearchResult BxBaseModNotificationsSearchResult BxBaseModProfileSearchResult BxBaseModTextSearchResult BxTemplPagesSearchResult BxTemplProfileSearchResult BxAccntSearchResult BxBaseModGeneralCmtsSearchResult BxBaseModNotificationsSearchResult BxBaseModProfileSearchResult BxBaseModTextSearchResult BxTemplPagesSearchResult BxTemplProfileSearchResult

Public Member Functions

 __construct ()
 
 getId ()
 
 setId ($sId)
 
 getModuleName ()
 
 getContentInfoName ()
 
 setAjaxPaginate ($b=true)
 
 setPaginatePerPage ($iPerPage)
 
 setSingleSearch ($bSingleSearch)
 
 setLiveSearch ($bLiveSearch)
 
 setMetaType ($s)
 
 isMetaEnabled ($s)
 
 setCategoryObject ($s)
 
 setCustomSearchCondition ($a)
 
 setCustomCurrentCondition ($a)
 
 setCategoriesCondition ($sKeyword)
 
 setDisplayEmptyMsg ($b, $sLangKey='')
 
 setProcessPrivateContent ($b)
 
 processingRaw ()
 
 processing ()
 
 processingAPI ()
 
 decodeDataAPI ($a)
 
 displayResultBlock ()
 
 displayResultBlockEmpty ()
 
 addCustomParts ()
 
 rss ()
 
 outputRSS ()
 
 getRssUnitLink (&$a)
 
 getRssUnitImage (&$a, $sField)
 
 setFieldUnit ($sFieldName, $sTableName, $sOperator='', $bRenameMode=true)
 
 displaySearchUnit ($aData)
 
 displaySearchBox ($sCode, $sPaginate='')
 
 showPagination ($bAdmin=false, $bChangePage=true, $bPageReload=true)
 
 getSearchData ()
 
 getSearchQuery ($sObject, $aParams=[])
 
 getJoins ($bRenameMode=true)
 
 getSearchDataByParams ($aParams='')
 
 setConditionParams ()
 
 getNum ()
 
 getTotal ()
 
 getRestriction ()
 
 getLimit ($isAddPlusOne=false)
 
 setSorting ()
 
 getSorting ($sSortType='last')
 
 getAlterOrder ()
 
 setPaginate ()
 
 unsetPaginate ()
 
 getSearchFieldsCond ($aFields, $sKeyword, $sPseud='')
 
 getMultiValues ($aValues)
 
 _getPseud ()
 
 addMarkers ($a)
 

Public Attributes

 $aCurrent
 

Protected Member Functions

 _replaceMarkers ($mixed)
 

Protected Attributes

 $aPseud
 
 $id
 
 $bDisplayEmptyMsg = false
 
 $sDisplayEmptyMsgKey = ''
 
 $bProcessPrivateContent = true
 
 $aPrivateConditionsIndexes = array('restriction' => array(), 'join' => array())
 
 $bForceAjaxPaginate = false
 
 $iPaginatePerPage = BX_DOL_SEARCH_RESULTS_PER_PAGE_DEFAULT
 
 $_bIsApi
 
 $_bSingleSearch = true
 
 $_bLiveSearch = false
 
 $_sMetaType = ''
 
 $_sMode = ''
 
 $_aParams = []
 
 $_sCategoryObject = ''
 
 $_aCustomSearchCondition = array()
 
 $_bValidate = false
 
 $_aMarkers = array ()
 

Constructor & Destructor Documentation

◆ __construct()

BxDolSearchResult::__construct ( )

constructor filling identificator field

Reimplemented in BxBasePagesSearchResult.

Member Function Documentation

◆ _getPseud()

BxDolSearchResult::_getPseud ( )

System method for filling aPseud array. Fill field aPseud for current class (if you will use own getSearchUnit methods then not necessary to redeclare).

Reimplemented in BxBaseModGeneralCmtsSearchResult, BxBaseModTextSearchResult, BxCnlSearchResult, BxCoursesSearchResult, BxEventsSearchResult, BxGroupsSearchResult, BxJobsSearchResult, BxOrgsSearchResult, BxPersonsSearchResult, and BxSpacesSearchResult.

◆ _replaceMarkers()

BxDolSearchResult::_replaceMarkers ( $mixed)
protected

Replace provided markers in a string

Parameters
$mixedstring or array to replace markers in
Returns
string where all occured markers are replaced

◆ addCustomParts()

BxDolSearchResult::addCustomParts ( )

Add different code before html output (usually redeclared) no return result

Reimplemented in BxFilesSearchResult, and BxPollsSearchResult.

◆ addMarkers()

BxDolSearchResult::addMarkers ( $a)

Add replace markers. Markers are replaced in titles and browse urls

Parameters
$aarray of markers as key => value
Returns
true on success or false on error

Implements iBxDolReplaceable.

◆ displayResultBlock()

◆ displayResultBlockEmpty()

BxDolSearchResult::displayResultBlockEmpty ( )

Get html output of empty search result

Returns
html code

Reimplemented in BxBaseSearchResult.

◆ displaySearchBox()

BxDolSearchResult::displaySearchBox ( $sCode,
$sPaginate = '' )

Get html code of search box with search results

Parameters
string$sCodehtml code of search results $param $sPaginate html code of paginate return html code

Reimplemented in BxBaseModGeneralSearchResult, BxBaseModGroupsSearchResult, and BxBaseSearchResult.

◆ displaySearchUnit()

BxDolSearchResult::displaySearchUnit ( $aData)

Get html code of of every search unit

Parameters
array$aDataarray of every search unit return html code

Reimplemented in BxBaseModGeneralCmtsSearchResult, BxBasePagesSearchResult, BxBaseProfileSearchResult, BxBaseSearchResult, and BxPollsSearchResult.

◆ getAlterOrder()

◆ getJoins()

BxDolSearchResult::getJoins ( $bRenameMode = true)

Get array with code for sql elements

Parameters
$bRenameModeindicator of renmaing fields return array with joinFields, ownFields, groupBy and join elements

◆ getLimit()

BxDolSearchResult::getLimit ( $isAddPlusOne = false)

Get limit part of query return $sqlFrom code for limit part pf query

◆ getMultiValues()

BxDolSearchResult::getMultiValues ( $aValues)

Get set from several values for 'in' and 'not in' operators

Parameters
$aValuesarray of values return sql code for field with operator IN (NOT IN)

◆ getNum()

BxDolSearchResult::getNum ( )

Check number of records on current page return number of records on current page + 1

◆ getRestriction()

BxDolSearchResult::getRestriction ( )

Check restriction params and make condition part of query return $sqlWhere sql code of query for WHERE part

◆ getRssUnitImage()

BxDolSearchResult::getRssUnitImage ( & $a,
$sField )

Return rss unit image (redeclared)

Reimplemented in BxBaseModProfileSearchResult, and BxBaseModTextSearchResult.

◆ getRssUnitLink()

BxDolSearchResult::getRssUnitLink ( & $a)

Return rss unit link (redeclared)

Reimplemented in BxAlbumsSearchResultMedia, and BxBaseModGeneralSearchResult.

◆ getSearchData()

BxDolSearchResult::getSearchData ( )

Get array of data with search results return array with data

Hooks:

'simple_search', 'before_get_data' - hook on before after get data

  • $unit_name - equals simple_search
  • $action - equals before_get_data
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

Hooks:

'simple_search', 'get_data' - hook on after get data

  • $unit_name - equals simple_search
  • $action - equals get_data
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

Reimplemented in BxFilesSearchResult, and BxPhotosSearchResult.

◆ getSearchDataByParams()

BxDolSearchResult::getSearchDataByParams ( $aParams = '')

Concat sql parts of query, run it and return result array

Parameters
$aParamsaddon param return $aData multivariate array

◆ getSearchFieldsCond()

BxDolSearchResult::getSearchFieldsCond ( $aFields,
$sKeyword,
$sPseud = '' )

Get sql where condition for search fields

Parameters
arrayof search fields
string$sKeywordkeyword value for search
stringsPseud for setting new name for generated set of fields in query return sql code of WHERE part in query

◆ getSearchQuery()

BxDolSearchResult::getSearchQuery ( $sObject,
$aParams = [] )

Get query [query, limit] for search results. Is used for combined search from different sections.

Parameters
type$aParamsarray with params
Returns
type array with query and limit

Hooks:

'simple_search', 'get_query' - hook on get sql queries

  • $unit_name - equals simple_search
  • $action - equals get_query
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • object - [array] by ref, array of parameters, can be overridden in hook processing
    • mode - [string] search mode
    • search_object - [string] search object name
    • search_query - [array] by ref, array of sql, can be overridden in hook processing
      HOOKS
      'simple_search', 'get_query' - hook on get sql queries

◆ getSorting()

BxDolSearchResult::getSorting ( $sSortType = 'last')

Get sorting part of query according current sorting mode

Parameters
string$sSortTypesorting type return array with sql elements order and ownFields

◆ getTotal()

BxDolSearchResult::getTotal ( )

Get total number of records return total number of records

◆ outputRSS()

BxDolSearchResult::outputRSS ( )

Output RSS XML with XML header

◆ processing()

BxDolSearchResult::processing ( )

Get html box of search results (usually used in grlobal search)

Returns
html code

Reimplemented in BxFilesSearchResult.

◆ processingRaw()

BxDolSearchResult::processingRaw ( )

Get search results without design box and paginate

Returns
html code

◆ rss()

BxDolSearchResult::rss ( )

Get XML string for rss output

Reimplemented in BxBaseModGeneralSearchResult.

◆ setConditionParams()

BxDolSearchResult::setConditionParams ( )

Set class fields condition params and paginate array

◆ setDisplayEmptyMsg()

BxDolSearchResult::setDisplayEmptyMsg ( $b,
$sLangKey = '' )

Display empty message if there is no content, custom empty message can be used.

Parameters
$b- boolan value to enable or disable 'empty' message
$sLangKey[optional] - custom 'empty' message

◆ setFieldUnit()

BxDolSearchResult::setFieldUnit ( $sFieldName,
$sTableName,
$sOperator = '',
$bRenameMode = true )

Naming fields in query's body

Parameters
string$sFieldNamename of field
string$sTableNamename of field's table $param string $sOperator of field's calculation (like MAX)
boolean$bRenameModeindicator for renaming and unsetting fields from field of class $this->aPseud return $sqlUnit sql code and unsetting elements from aPseud field

◆ setPaginate()

BxDolSearchResult::setPaginate ( )

Set paginate fields of class according GET params 'start' and 'per_page' forcePage is need for setting most important number of current page

◆ setProcessPrivateContent()

BxDolSearchResult::setProcessPrivateContent ( $b)

Perform privacy checking for every unit

Parameters
$b- boolan value to enable or disable privacy checking

◆ setSorting()

BxDolSearchResult::setSorting ( )

Set sorting field of class

◆ showPagination()

BxDolSearchResult::showPagination ( $bAdmin = false,
$bChangePage = true,
$bPageReload = true )

Get html code of pagination

Reimplemented in BxBaseModGeneralSearchResult, BxBaseSearchResult, and BxFilesSearchResult.


The documentation for this class was generated from the following file: