TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\IndexedSearch\Controller\SearchFormController Class Reference
Inheritance diagram for TYPO3\CMS\IndexedSearch\Controller\SearchFormController:
TYPO3\CMS\Frontend\Plugin\AbstractPlugin

Public Member Functions

 main ($content, $conf)
 
 initialize ()
 
 getSearchWords ($defOp)
 
 procSearchWordsByLexer ($SWArr)
 
 doSearch ($sWArr)
 
 getResultRows ($searchWordArray, $freeIndexUid=-1)
 
 getResultRows_SQLpointer ($sWArr, $freeIndexUid=-1)
 
 getDisplayResults ($sWArr, $resData, $freeIndexUid=-1)
 
 compileResult ($resultRows, $freeIndexUid=-1)
 
 execPHashListQuery ($wordSel, $plusQ='')
 
 searchWord ($sWord, $wildcard)
 
 searchDistinct ($sWord)
 
 searchSentence ($sSentence)
 
 searchMetaphone ($sWord)
 
 sectionTableWhere ()
 
 mediaTypeWhere ()
 
 languageWhere ()
 
 freeIndexUidWhere ($freeIndexUid)
 
 execFinalQuery ($list, $freeIndexUid=-1)
 
 checkResume ($row)
 
 checkExistance ($row)
 
 isDescending ($inverse=false)
 
 writeSearchStat ($sWArr, $count, $pt)
 
 makeSearchForm ($optValues)
 
 renderSelectBoxValues ($value, $optValues)
 
 printRules ()
 
 printResultSectionLinks ()
 
 makeSectionHeader ($id, $sectionTitleLinked, $countResultRows)
 
 printResultRow ($row, $headerOnly=0)
 
 prepareResultRowTemplateData ($row, $headerOnly)
 
 tellUsWhatIsSeachedFor ($sWArr)
 
 wrapSW ($str)
 
 renderSelectBox ($name, $value, $optValues)
 
 makePointerSelector_link ($str, $p, $freeIndexUid)
 
 makeItemTypeIcon ($it, $alt='', $specRowConf)
 
 makeRating ($row)
 
 makeDescription ($row, $noMarkup=false, $lgd=180)
 
 markupSWpartsOfString ($str)
 
 makeTitle ($row)
 
 makeInfo ($row, $tmplArray)
 
 getSpecialConfigForRow ($row)
 
 makeLanguageIndication ($row)
 
 makeAccessIndication ($id)
 
 linkPage ($id, $str, $row=[], $markUpSwParams=[])
 
 getRootLine ($id, $pathMP='')
 
 getFirstSysDomainRecordForPage ($id)
 
 getPathFromPageId ($id, $pathMP='')
 
 getMenu ($id)
 
 multiplePagesType ($item_type)
 
 utf8_to_currentCharset ($str)
 
 hookRequest ($functionName)
 
 getSearchType ()
 
 getSearchRootPageIdList ()
 
 getJoinPagesForQuery ()
 
- Public Member Functions inherited from TYPO3\CMS\Frontend\Plugin\AbstractPlugin
 pi_setPiVarDefaults ()
 
 pi_getPageLink ($id, $target='', $urlParameters=[])
 
 pi_linkToPage ($str, $id, $target='', $urlParameters=[])
 
 pi_linkTP ($str, $urlParameters=[], $cache=false, $altPageId=0)
 
 pi_linkTP_keepPIvars ($str, $overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_linkTP_keepPIvars_url ($overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_list_linkSingle ($str, $uid, $cache=false, $mergeArr=[], $urlOnly=false, $altPageId=0)
 
 pi_openAtagHrefInJSwindow ($str, $winName='', $winParams='width=670, height=500, status=0, menubar=0, scrollbars=1, resizable=1')
 
 pi_list_browseresults ($showResultCount=1, $tableParams='', $wrapArr=[], $pointerName='pointer', $hscText=true, $forceOutput=false)
 
 pi_list_searchBox ($tableParams='')
 
 pi_list_modeSelector ($items=[], $tableParams='')
 
 pi_list_makelist ($res, $tableParams='')
 
 pi_list_row ($c)
 
 pi_list_header ()
 
 pi_getClassName ($class)
 
 pi_classParam ($class, $addClasses='')
 
 pi_wrapInBaseClass ($str)
 
 pi_getEditPanel ($row=[], $tablename='', $label='', $conf=[])
 
 pi_getEditIcon ($content, $fields, $title='', $row=[], $tablename='', $oConf=[])
 
 pi_getLL ($key, $alternativeLabel='', $hsc=false)
 
 pi_exec_query ($table, $count=false, $addWhere='', $mm_cat='', $groupBy='', $orderBy='', $query='')
 
 pi_getRecord ($table, $uid, $checkPage=false)
 
 pi_getPidList ($pid_list, $recursive=0)
 
 pi_prependFieldsWithTable ($table, $fieldList)
 
 pi_getCategoryTableContents ($table, $pid, $whereClause='', $groupBy='', $orderBy='', $limit='')
 
 pi_isOnlyFields ($fList, $lowerThan=-1)
 
 pi_autoCache ($inArray)
 
 pi_RTEcssText ($str)
 
 pi_initPIflexForm ($field='pi_flexform')
 
 pi_getFFvalue ($T3FlexForm_array, $fieldName, $sheet='sDEF', $lang='lDEF', $value='vDEF')
 
 pi_getFFvalueFromSheetArray ($sheetArray, $fieldNameArr, $value)
 

Public Attributes

 $prefixId = 'tx_indexedsearch'
 
 $extKey = 'indexed_search'
 
 $join_pages = 0
 
 $defaultResultNumber = 10
 
 $operator_translate_table = [['+', 'AND'], ['|', 'OR'], ['-', 'AND NOT']]
 
 $wholeSiteIdList = 0
 
 $sWArr = []
 
 $optValues = []
 
 $firstRow = []
 
 $cache_path = []
 
 $cache_rl = []
 
 $fe_groups_required = []
 
 $domain_records = []
 
 $wSelClauses = []
 
 $resultSections = []
 
 $external_parsers = []
 
 $iconFileNameCache = []
 
 $templateCode = ''
 
 $hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results'
 
 $indexerConfig = []
 
 $enableMetaphoneSearch = false
 
 $storeMetaphoneInfoAsWords
 
 $lexerObj
 
- Public Attributes inherited from TYPO3\CMS\Frontend\Plugin\AbstractPlugin
 $cObj
 
 $prefixId
 
 $scriptRelPath
 
 $extKey
 
 $piVars
 
 $internal = ['res_count' => 0
 
 $LOCAL_LANG = []
 
 $LOCAL_LANG_charset = []
 
 $LOCAL_LANG_loaded = 0
 
 $LLkey = 'default'
 
 $altLLkey = ''
 
 $LLtestPrefix = ''
 
 $LLtestPrefixAlt = ''
 
 $pi_isOnlyFields = 'mode,pointer'
 
 $pi_alwaysPrev = 0
 
 $pi_lowerThan = 5
 
 $pi_moreParams = ''
 
 $pi_listFields = '*'
 
 $pi_autoCacheFields = []
 
 $pi_autoCacheEn = 0
 
 $pi_USER_INT_obj = false
 
 $pi_checkCHash = false
 
 $conf = []
 
 $pi_EPtemp_cObj
 
 $pi_tmpPageId = 0
 

Protected Member Functions

 checkExistence ($row)
 
 renderPagination ($showResultCount=true, $addString='', $addPart='', $freeIndexUid=-1)
 
 getSearchFormActionURL ()
 
 getSearchFormActionPidFromTS ()
 
 formatCreatedDate ($date)
 
 formatModifiedDate ($date)
 
 formatDate ($date, $tsKey, $defaultFormat)
 
 loadSettings ()
 
- Protected Member Functions inherited from TYPO3\CMS\Frontend\Plugin\AbstractPlugin
 applyStdWrapRecursive (array $conf, $level=0)
 

Additional Inherited Members

- Protected Attributes inherited from TYPO3\CMS\Frontend\Plugin\AbstractPlugin
 $LOCAL_LANG_UNSET = []
 
 $frontendController
 
 $databaseConnection
 

Detailed Description

Index search frontend

Creates a searchform for indexed search. Indexing must be enabled for this to make sense.

Definition at line 29 of file SearchFormController.php.

Member Function Documentation

◆ checkExistance()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::checkExistance (   $row)

Check if the record is still available or if it has been deleted meanwhile. Currently this works for files only, since extending it to page content would cause a lot of overhead.

Parameters
array$rowResult row array
Returns
bool Returns TRUE if record is still available
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1261 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\checkExistence().

◆ checkExistence()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::checkExistence (   $row)
protected

Check if the record is still available or if it has been deleted meanwhile. Currently this works for files only, since extending it to page content would cause a lot of overhead.

Parameters
array$rowResult row array
Returns
bool Returns TRUE if record is still available
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 (it is not used in the core any more, see #44381)

Definition at line 1274 of file SearchFormController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\checkExistance().

◆ checkResume()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::checkResume (   $row)

Checking if the resume can be shown for the search result (depending on whether the rights are OK) ? Should it also check for gr_list "0,-1"?

Parameters
array$rowResult row array.
Returns
bool Returns TRUE if resume can safely be shown

Definition at line 1208 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility\isTableUsed().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getResultRows().

◆ compileResult()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::compileResult (   $resultRows,
  $freeIndexUid = -1 
)

◆ doSearch()

◆ execFinalQuery()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::execFinalQuery (   $list,
  $freeIndexUid = -1 
)

Execute final query, based on phash integer list. The main point is sorting the result in the right order.

Parameters
string$listList of phash integers which match the search.
int$freeIndexUidPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
bool| Query result pointer

Definition at line 1105 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\freeIndexUidWhere(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\hookRequest(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\isDescending(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\languageWhere(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\mediaTypeWhere().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getResultRows_SQLpointer().

◆ execPHashListQuery()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::execPHashListQuery (   $wordSel,
  $plusQ = '' 
)

Returns a query which selects the search-word from the word/rel tables.

Parameters
string$wordSelWHERE clause selecting the word from phash
string$plusQAdditional AND clause in the end of the query.
Returns
bool| SQL result pointer

Definition at line 887 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\sectionTableWhere().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\searchDistinct(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\searchMetaphone(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\searchWord().

◆ formatCreatedDate()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::formatCreatedDate (   $date)
protected

Formats date as 'created' date

Parameters
int$date
Returns
string

Definition at line 2405 of file SearchFormController.php.

References $GLOBALS, and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\formatDate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeInfo().

◆ formatDate()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::formatDate (   $date,
  $tsKey,
  $defaultFormat 
)
protected

Formats the date using format string from TypoScript or default format if TypoScript format is not set

Parameters
int$date
string$tsKey
string$defaultFormat
Returns
string

Definition at line 2432 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\formatCreatedDate(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\formatModifiedDate().

◆ formatModifiedDate()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::formatModifiedDate (   $date)
protected

Formats date as 'modified' date

Parameters
int$date
Returns
string

Definition at line 2417 of file SearchFormController.php.

References $GLOBALS, and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\formatDate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeInfo().

◆ freeIndexUidWhere()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::freeIndexUidWhere (   $freeIndexUid)

Where-clause for free index-uid value.

Parameters
int$freeIndexUidFree Index UID value to limit search to.
Returns
string WHERE SQL clause part.

Definition at line 1063 of file SearchFormController.php.

References $uid, TYPO3\CMS\Core\Utility\GeneralUtility\revExplode(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execFinalQuery().

◆ getDisplayResults()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getDisplayResults (   $sWArr,
  $resData,
  $freeIndexUid = -1 
)

Compiles the HTML display of the incoming array of result rows.

Parameters
array$sWArrSearch words array (for display of text describing what was searched for)
array$resDataArray with result rows, count, first row.
int$freeIndexUidPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
string HTML content to display result.

Definition at line 656 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$sWArr, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\compileResult(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getPathFromPageId(), TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_classParam(), TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\printResultSectionLinks(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\renderPagination(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\tellUsWhatIsSeachedFor().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\doSearch().

◆ getFirstSysDomainRecordForPage()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getFirstSysDomainRecordForPage (   $id)

Gets the first sys_domain record for the page, $id

Parameters
int$idPage id
Returns
string Domain name

Definition at line 2247 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getPathFromPageId().

◆ getJoinPagesForQuery()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getJoinPagesForQuery ( )

Getter for join_pages flag enabled through $this->conf['search.']['skipExtendToSubpagesChecking']

Returns
bool

Definition at line 2470 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$join_pages.

◆ getMenu()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getMenu (   $id)

Return the menu of pages used for the selector.

Parameters
int$idPage ID for which to return menu
Returns
array Menu items (for making the section selector box)

Definition at line 2311 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\initialize().

◆ getPathFromPageId()

◆ getResultRows()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getResultRows (   $searchWordArray,
  $freeIndexUid = -1 
)

Get search result rows / data from database. Returned as data in array.

Parameters
array$searchWordArraySearch word array
int$freeIndexUidPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
array False if no result, otherwise an array with keys for first row, result rows and total number of results found.

Definition at line 532 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$firstRow, $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\checkResume(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getResultRows_SQLpointer(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\hookRequest(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\multiplePagesType().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\doSearch().

◆ getResultRows_SQLpointer()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getResultRows_SQLpointer (   $sWArr,
  $freeIndexUid = -1 
)

Gets a SQL result pointer to traverse for the search records.

Parameters
array$sWArrSearch words
int$freeIndexUidPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
bool| Query result pointer

Definition at line 632 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$sWArr, and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execFinalQuery().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getResultRows().

◆ getRootLine()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getRootLine (   $id,
  $pathMP = '' 
)

Returns the path to the page $id

Parameters
int$idPage ID
string$pathMPMP variable content.
Returns
string Root line for result.

Definition at line 2232 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getPathFromPageId(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getSpecialConfigForRow().

◆ getSearchFormActionPidFromTS()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSearchFormActionPidFromTS ( )
protected

Obtains search form target pid from the TypoScript configuration

Returns
int

Definition at line 2385 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getSearchFormActionURL().

◆ getSearchFormActionURL()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSearchFormActionURL ( )
protected

◆ getSearchRootPageIdList()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSearchRootPageIdList ( )

A list of integer which should be root-pages to search from

Returns
int[]

Definition at line 2459 of file SearchFormController.php.

◆ getSearchType()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSearchType ( )

Search type e.g. sentence (20), any part of the word (1)

Returns
int

Definition at line 2449 of file SearchFormController.php.

◆ getSearchWords()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSearchWords (   $defOp)

Splits the search word input into an array where each word is represented by an array with key "sword" holding the search word and key "oper" holding the SQL operator (eg. AND, OR)

Only words with 2 or more characters are accepted Max 200 chars total Space is used to split words, "" can be used search for a whole string AND, OR and NOT are prefix words, overruling the default operator +/|/- equals AND, OR and NOT as operators. All search words are converted to lowercase.

$defOp is the default operator. 1=OR, 0=AND

Parameters
bool$defOpIf TRUE, the default operator will be OR, not AND
Returns
array Returns array with search words if any found

Definition at line 418 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility\getExplodedSearchString(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\hookRequest(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\procSearchWordsByLexer().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\initialize().

◆ getSpecialConfigForRow()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSpecialConfigForRow (   $row)

Returns configuration from TypoScript for result row based on ID / location in page tree!

Parameters
array$rowResult row
Returns
array Configuration array

Definition at line 2127 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getRootLine().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ hookRequest()

◆ initialize()

◆ isDescending()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::isDescending (   $inverse = false)

Returns "DESC" or "" depending on the settings of the incoming highest/lowest result order (piVars['desc']

Parameters
bool$inverseIf TRUE, inverse the order which is defined by piVars['desc']
Returns
string " DESC" or

Definition at line 1294 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execFinalQuery().

◆ languageWhere()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::languageWhere ( )

Returns AND statement for selection of language

Returns
string AND statement for selection of language

Definition at line 1047 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execFinalQuery().

◆ linkPage()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::linkPage (   $id,
  $str,
  $row = [],
  $markUpSwParams = [] 
)

Links the $str to page $id

Parameters
int$idPage id
string$strTitle String to link
array$rowResult row
array$markUpSwParamsAdditional parameters for marking up seach words
Returns
string tag wrapped title string.

Definition at line 2189 of file SearchFormController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getPathFromPageId(), TYPO3\CMS\Core\Utility\GeneralUtility\implodeArrayForUrl(), and TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkToPage().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeInfo(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ loadSettings()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::loadSettings ( )
protected

◆ main()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::main (   $content,
  $conf 
)

◆ makeAccessIndication()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeAccessIndication (   $id)

Returns the HTML code for the locking symbol. NOTICE: Requires a call to ->getPathFromPageId() first in order to work (done in ->makeInfo() by calling that first)

Parameters
int$idPage id for which to find answer
Returns
string tag if access is limited.

Definition at line 2171 of file SearchFormController.php.

References TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\siteRelPath().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ makeDescription()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeDescription (   $row,
  $noMarkup = false,
  $lgd = 180 
)

Returns the resume for the search-result.

Parameters
array$rowSearch result row
bool$noMarkupIf noMarkup is FALSE, then the index_fulltext table is used to select the content of the page, split it with regex to display the search words in the text.
int$lgdString length
Returns
string HTML string

Definition at line 1964 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility\isTableUsed(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\markupSWpartsOfString(), TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\utf8_to_currentCharset().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ makeInfo()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeInfo (   $row,
  $tmplArray 
)

◆ makeItemTypeIcon()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeItemTypeIcon (   $it,
  $alt = '',
  $specRowConf 
)

Return icon for file extension

Parameters
string$itFile extension / item type
string$altTitle attribute value in icon.
array$specRowConfTypoScript configuration specifically for search result.
Returns
string tag for icon

Definition at line 1870 of file SearchFormController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\getFileAbsFileName(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ makeLanguageIndication()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeLanguageIndication (   $row)

Returns the HTML code for language indication.

Parameters
array$rowResult row
Returns
string HTML code for result row.

Definition at line 2151 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ makePointerSelector_link()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makePointerSelector_link (   $str,
  $p,
  $freeIndexUid 
)

Used to make the link for the result-browser. Notice how the links must resubmit the form after setting the new pointer-value in a hidden formfield.

Parameters
string$strString to wrap in tag
int$pPointer value
string$freeIndexUidList of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
Returns
string Input string wrapped in tag with onclick event attribute set.

Definition at line 1856 of file SearchFormController.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\renderPagination().

◆ makeRating()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeRating (   $row)

Return the rating-HTML code for the result row. This makes use of the $this->firstRow

Parameters
array$rowResult row array
Returns
string String showing ranking value

Definition at line 1914 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), and TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\prepareResultRowTemplateData().

◆ makeSearchForm()

◆ makeSectionHeader()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeSectionHeader (   $id,
  $sectionTitleLinked,
  $countResultRows 
)

Returns the section header of the search result.

Parameters
string$idID for the section (used for anchor link)
string$sectionTitleLinkedSection title with linked wrapped around
int$countResultRowsNumber of results in section
Returns
string HTML output

Definition at line 1570 of file SearchFormController.php.

References TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\compileResult().

◆ makeTitle()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::makeTitle (   $row)

◆ markupSWpartsOfString()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::markupSWpartsOfString (   $str)

Marks up the search words from $this->sWarr in the $str with a color.

Parameters
string$strText in which to find and mark up search words. This text is assumed to be UTF-8 like the search words internally is.
Returns
string Processed content.

Definition at line 2001 of file SearchFormController.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeDescription().

◆ mediaTypeWhere()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::mediaTypeWhere ( )

Returns AND statement for selection of media type

Returns
string AND statement for selection of media type

Definition at line 1021 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execFinalQuery().

◆ multiplePagesType()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::multiplePagesType (   $item_type)

Returns if an item type is a multipage item type

Parameters
string$item_typeItem type
Returns
bool TRUE if multipage capable

Definition at line 2332 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getResultRows(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeTitle(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\printResultRow().

◆ prepareResultRowTemplateData()

◆ printResultRow()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::printResultRow (   $row,
  $headerOnly = 0 
)

◆ printResultSectionLinks()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::printResultSectionLinks ( )

◆ printRules()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::printRules ( )

Print the searching rules

Returns
string Rules for the search

Definition at line 1524 of file SearchFormController.php.

References TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\main().

◆ procSearchWordsByLexer()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::procSearchWordsByLexer (   $SWArr)

Post-process the search word array so it will match the words that was indexed (including case-folding if any) If any words are split into multiple words (eg. CJK will be!) the operator of the main word will remain.

Parameters
array$SWArrSearch word array
Returns
array Search word array, processed through lexer

Definition at line 449 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getSearchWords().

◆ renderPagination()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::renderPagination (   $showResultCount = true,
  $addString = '',
  $addPart = '',
  $freeIndexUid = -1 
)
protected

Returns a results browser, former method name: pi_list_browseresults

Parameters
bool$showResultCountShow result count
string$addStringString appended to "displaying results..." notice.
string$addPartString appended after section "displaying results...
string$freeIndexUidList of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
Returns
string HTML output

Definition at line 1643 of file SearchFormController.php.

References $a, TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makePointerSelector_link(), TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_classParam(), and TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\getDisplayResults().

◆ renderSelectBox()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::renderSelectBox (   $name,
  $value,
  $optValues 
)

Makes a selector box

Parameters
string$nameName of selector box
string$valueCurrent value
array$optValuesArray of options in the selector box (value => label pairs)
Returns
string HTML of selector box

Definition at line 1831 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$optValues.

◆ renderSelectBoxValues()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::renderSelectBoxValues (   $value,
  $optValues 
)

Function, rendering selector box values.

Parameters
string$valueCurrent value
array$optValuesArray with the options as key=>value pairs
Returns
string <options> imploded.

Definition at line 1502 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$optValues.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeSearchForm().

◆ searchDistinct()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::searchDistinct (   $sWord)

Search for one distinct word

Parameters
string$sWordWord to search for
Returns
bool| SQL result pointer

Definition at line 925 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execPHashListQuery(), and TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility\md5inthash().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\compileResult().

◆ searchMetaphone()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::searchMetaphone (   $sWord)

Search for a metaphone word

Parameters
string$sWordWord to search for
Returns
SQL result pointer

Definition at line 961 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execPHashListQuery().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\compileResult().

◆ searchSentence()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::searchSentence (   $sSentence)

◆ searchWord()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::searchWord (   $sWord,
  $wildcard 
)

Search for a word

Parameters
string$sWordWord to search for
int$wildcardBit-field of Utility
Returns
bool| SQL result pointer

Definition at line 905 of file SearchFormController.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execPHashListQuery().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\compileResult().

◆ sectionTableWhere()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::sectionTableWhere ( )

Returns AND statement for selection of section in database. (rootlevel 0-2 + page_id)

Returns
string AND clause for selection of section in database.

Definition at line 973 of file SearchFormController.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\execPHashListQuery(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\searchSentence().

◆ tellUsWhatIsSeachedFor()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::tellUsWhatIsSeachedFor (   $sWArr)

◆ utf8_to_currentCharset()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::utf8_to_currentCharset (   $str)

Converts the input string from utf-8 to the backend charset.

Parameters
stringString to convert (utf-8)
Returns
string Converted string (backend charset if different from utf-8)

Definition at line 2343 of file SearchFormController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeDescription(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\makeTitle(), and TYPO3\CMS\IndexedSearch\Controller\SearchFormController\tellUsWhatIsSeachedFor().

◆ wrapSW()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::wrapSW (   $str)

Wraps the search words in the search-word list display (from ->tellUsWhatIsSeachedFor())

Parameters
string$strsearch word to wrap (in local charset!)
Returns
string Search word wrapped in tag.

Definition at line 1818 of file SearchFormController.php.

References TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_classParam().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\tellUsWhatIsSeachedFor().

◆ writeSearchStat()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::writeSearchStat (   $sWArr,
  $count,
  $pt 
)

Write statistics information to database for the search operation

Parameters
array$sWArrSearch Word array
int$countNumber of hits
int$ptMilliseconds the search took
Returns
void

Definition at line 1311 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$sWArr, TYPO3\CMS\Core\Utility\IpAnonymizationUtility\anonymizeIp(), and TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchFormController\doSearch().

Member Data Documentation

◆ $cache_path

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$cache_path = []

Definition at line 94 of file SearchFormController.php.

◆ $cache_rl

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$cache_rl = []

Definition at line 101 of file SearchFormController.php.

◆ $defaultResultNumber

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$defaultResultNumber = 10

Definition at line 52 of file SearchFormController.php.

◆ $domain_records

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$domain_records = []

Definition at line 115 of file SearchFormController.php.

◆ $enableMetaphoneSearch

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$enableMetaphoneSearch = false

Definition at line 163 of file SearchFormController.php.

◆ $external_parsers

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$external_parsers = []

Definition at line 135 of file SearchFormController.php.

◆ $extKey

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$extKey = 'indexed_search'

Definition at line 43 of file SearchFormController.php.

◆ $fe_groups_required

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$fe_groups_required = []

Definition at line 108 of file SearchFormController.php.

◆ $firstRow

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$firstRow = []

◆ $hiddenFieldList

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results'

Definition at line 151 of file SearchFormController.php.

◆ $iconFileNameCache

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$iconFileNameCache = []

Definition at line 142 of file SearchFormController.php.

◆ $indexerConfig

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$indexerConfig = []

Definition at line 158 of file SearchFormController.php.

◆ $join_pages

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$join_pages = 0

◆ $lexerObj

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$lexerObj

Definition at line 172 of file SearchFormController.php.

◆ $operator_translate_table

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$operator_translate_table = [['+', 'AND'], ['|', 'OR'], ['-', 'AND NOT']]

Definition at line 59 of file SearchFormController.php.

◆ $optValues

◆ $prefixId

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$prefixId = 'tx_indexedsearch'

Definition at line 36 of file SearchFormController.php.

◆ $resultSections

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$resultSections = []

Definition at line 129 of file SearchFormController.php.

◆ $storeMetaphoneInfoAsWords

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$storeMetaphoneInfoAsWords

Definition at line 165 of file SearchFormController.php.

◆ $sWArr

◆ $templateCode

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$templateCode = ''

Definition at line 149 of file SearchFormController.php.

◆ $wholeSiteIdList

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$wholeSiteIdList = 0

Definition at line 66 of file SearchFormController.php.

◆ $wSelClauses

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$wSelClauses = []

Definition at line 122 of file SearchFormController.php.