TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\IndexedSearch\Controller\SearchFormController Class Reference
Inheritance diagram for TYPO3\CMS\IndexedSearch\Controller\SearchFormController:
TYPO3\CMS\Frontend\Plugin\AbstractPlugin tx_indexedsearch

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, $mode)
 
 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)
 
 pi_list_browseresults ($showResultCount=TRUE, $addString='', $addPart='', $freeIndexUid=-1)
 
 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=0, $lgd=180)
 
 markupSWpartsOfString ($str)
 
 makeTitle ($row)
 
 makeInfo ($row, $tmplArray)
 
 getSpecialConfigForRow ($row)
 
 makeLanguageIndication ($row)
 
 makeAccessIndication ($id)
 
 linkPage ($id, $str, $row=array(), $markUpSwParams=array())
 
 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=array())
 
 pi_linkToPage ($str, $id, $target='', $urlParameters=array())
 
 pi_linkTP ($str, $urlParameters=array(), $cache=0, $altPageId=0)
 
 pi_linkTP_keepPIvars ($str, $overrulePIvars=array(), $cache=0, $clearAnyway=0, $altPageId=0)
 
 pi_linkTP_keepPIvars_url ($overrulePIvars=array(), $cache=0, $clearAnyway=0, $altPageId=0)
 
 pi_list_linkSingle ($str, $uid, $cache=FALSE, $mergeArr=array(), $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=array(), $pointerName='pointer', $hscText=TRUE, $forceOutput=FALSE)
 
 pi_list_searchBox ($tableParams='')
 
 pi_list_modeSelector ($items=array(), $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=array())
 
 pi_getEditIcon ($content, $fields, $title='', $row='', $tablename='', $oConf=array())
 
 pi_getLL ($key, $alternativeLabel='', $hsc=FALSE)
 
 pi_loadLL ()
 
 pi_exec_query ($table, $count=0, $addWhere='', $mm_cat='', $groupBy='', $orderBy='', $query='')
 
 pi_getRecord ($table, $uid, $checkPage=0)
 
 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'
 
 $scriptRelPath = 'pi/class.tx_indexedsearch.php'
 
 $extKey = 'indexed_search'
 
 $join_pages = 0
 
 $defaultResultNumber = 10
 
 $operator_translate_table = array(array('+', 'AND'), array('|', 'OR'), array('-', 'AND NOT'))
 
 $wholeSiteIdList = 0
 
 $sWArr = array()
 
 $optValues = array()
 
 $firstRow = array()
 
 $cache_path = array()
 
 $cache_rl = array()
 
 $fe_groups_required = array()
 
 $domain_records = array()
 
 $wSelClauses = array()
 
 $resultSections = array()
 
 $external_parsers = array()
 
 $iconFileNameCache = array()
 
 $templateCode
 
 $hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results'
 
 $indexerConfig = array()
 
 $enableMetaphoneSearch = FALSE
 
 $storeMetaphoneInfoAsWords
 
 $lexerObj
 
const WILDCARD_LEFT = 1
 
const WILDCARD_RIGHT = 2
 
- Public Attributes inherited from TYPO3\CMS\Frontend\Plugin\AbstractPlugin
 $cObj
 
 $prefixId
 
 $scriptRelPath
 
 $extKey
 
 $piVars
 
 $internal = array('res_count' => 0, 'results_at_a_time' => 20, 'maxPages' => 10, 'currentRow' => array(), 'currentTable' => '')
 
 $LOCAL_LANG = array()
 
 $LOCAL_LANG_charset = array()
 
 $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 = array()
 
 $pi_autoCacheEn = 0
 
 $pi_USER_INT_obj = FALSE
 
 $pi_checkCHash = FALSE
 
 $conf = array()
 
 $pi_EPtemp_cObj
 
 $pi_tmpPageId = 0
 

Protected Member Functions

 getSearchFormActionURL ()
 
 getSearchFormActionPidFromTS ()
 
 formatCreatedDate ($date)
 
 formatModifiedDate ($date)
 
 formatDate ($date, $tsKey, $defaultFormat)
 
- 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 = array()
 

Detailed Description

Index search frontend

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

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 27 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
arrayResult row array
Returns
boolean Returns TRUE if record is still available
Todo:
Define visibility

Definition at line 1252 of file SearchFormController.php.

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

◆ 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
arrayResult row array.
Returns
boolean Returns TRUE if resume can safely be shown
Todo:
Define visibility

Definition at line 1200 of file SearchFormController.php.

References $GLOBALS.

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

◆ compileResult()

◆ 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
stringList of phash integers which match the search.
integerPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
pointer Query result pointer
Todo:
Define visibility

Definition at line 1097 of file SearchFormController.php.

References $GLOBALS, 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
stringWHERE clause selecting the word from phash
stringAdditional AND clause in the end of the query.
Returns
pointer SQL result pointer
Todo:
Define visibility

Definition at line 893 of file SearchFormController.php.

References $GLOBALS, and 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
integer$date
Returns
string

Definition at line 2360 of file SearchFormController.php.

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

◆ 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
integer$date
string$tsKey
string$defaultFormat
Returns
string

Definition at line 2385 of file SearchFormController.php.

References $result.

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
integer$date
Returns
string

Definition at line 2371 of file SearchFormController.php.

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

◆ freeIndexUidWhere()

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

Where-clause for free index-uid value.

Parameters
integerFree Index UID value to limit search to.
Returns
string WHERE SQL clause part.
Todo:
Define visibility

Definition at line 1056 of file SearchFormController.php.

References $GLOBALS, $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
arraySearch words array (for display of text describing what was searched for)
arrayArray with result rows, count, first row.
integerPointer 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.
Todo:
Define visibility

Definition at line 665 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\pi_list_browseresults(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\printResultSectionLinks(), 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
integerPage id
Returns
string Domain name
Todo:
Define visibility

Definition at line 2208 of file SearchFormController.php.

References $GLOBALS.

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 2420 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
integerPage ID for which to return menu
Returns
array Menu items (for making the section selector box)
Todo:
Define visibility

Definition at line 2268 of file SearchFormController.php.

References $GLOBALS.

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

◆ getPathFromPageId()

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

◆ 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
integerPointer 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.
Todo:
Define visibility

Definition at line 534 of file SearchFormController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$firstRow, $GLOBALS, $result, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\checkExistance(), 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
arraySearch words
integerPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
pointer
Todo:
Define visibility

Definition at line 641 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
integerPage ID
stringMP variable content.
Returns
string Root line for result.
Todo:
Define visibility

Definition at line 2193 of file SearchFormController.php.

References $GLOBALS.

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

◆ getSearchFormActionPidFromTS()

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

Obtains search form target pid from the TypoScript configuration

Returns
integer

Definition at line 2341 of file SearchFormController.php.

References $result.

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 2410 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 2401 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
booleanIf TRUE, the default operator will be OR, not AND
Returns
array Returns array with search words if any found
Todo:
Define visibility

Definition at line 417 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$operator_translate_table, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\hookRequest(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), 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
arrayResult row
Returns
array Configuration array
Todo:
Define visibility

Definition at line 2071 of file SearchFormController.php.

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
booleanIf TRUE, inverse the order which is defined by piVars['desc']
Returns
string " DESC" or
Todo:
Define visibility

Definition at line 1271 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 langauge
Todo:
Define visibility

Definition at line 1042 of file SearchFormController.php.

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

◆ linkPage()

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

Links the $str to page $id

Parameters
integerPage id
stringTitle String to link
arrayResult row
arrayAdditional parameters for marking up seach words
Returns
string tag wrapped title string.
Todo:
Define visibility

Definition at line 2146 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\prepareResultRowTemplateData().

◆ 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
integerPage id for which to find answer
Returns
string tag if access is limited.
Todo:
Define visibility

Definition at line 2130 of file SearchFormController.php.

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

◆ makeDescription()

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

Returns the resume for the search-result.

Parameters
arraySearch result row
booleanIf 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.
integerString length
Returns
string HTML string ...
Todo:
Define visibility

Definition at line 1909 of file SearchFormController.php.

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

◆ makeInfo()

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

Returns the info-string in the bottom of the result-row display (size, dates, path)

Parameters
arrayResult row
arrayTemplate array to modify
Returns
array Modified template array
Todo:
Define visibility

Definition at line 2039 of file SearchFormController.php.

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

◆ makeItemTypeIcon()

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

Return icon for file extension

Parameters
stringFile extension / item type
stringTitle attribute value in icon.
arrayTypoScript configuration specifically for search result.
Returns
string tag for icon
Todo:
Define visibility

Definition at line 1815 of file SearchFormController.php.

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

◆ makeLanguageIndication()

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

Returns the HTML code for language indication.

Parameters
arrayResult row
Returns
string HTML code for result row.
Todo:
Define visibility

Definition at line 2095 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
stringString to wrap in tag
integerPointer value
stringList 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.
Todo:
Define visibility

Definition at line 1801 of file SearchFormController.php.

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

◆ 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
arrayResult row array
Returns
string String showing ranking value
Todo:
Define visibility

Definition at line 1859 of file SearchFormController.php.

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
stringID for the section (used for anchor link)
stringSection title with linked wrapped around
integerNumber of results in section
Returns
string HTML output
Todo:
Define visibility

Definition at line 1523 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)

Returns the title of the search result row

Parameters
arrayResult row
Returns
string Title from row
Todo:
Define visibility

Definition at line 2016 of file SearchFormController.php.

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

◆ markupSWpartsOfString()

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

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

Parameters
stringText 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.
Todo:
Define visibility

Definition at line 1945 of file SearchFormController.php.

◆ mediaTypeWhere()

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

Returns AND statement for selection of media type

Returns
string AND statement for selection of media type
Todo:
Define visibility

Definition at line 1016 of file SearchFormController.php.

References $GLOBALS.

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
stringItem type
Returns
boolean TRUE if multipage capable
Todo:
Define visibility

Definition at line 2289 of file SearchFormController.php.

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

◆ pi_list_browseresults()

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::pi_list_browseresults (   $showResultCount = TRUE,
  $addString = '',
  $addPart = '',
  $freeIndexUid = -1 
)

Returns a results browser

Parameters
boolean$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
Todo:
Define visibility

Definition at line 1596 of file SearchFormController.php.

References 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().

◆ prepareResultRowTemplateData()

◆ printResultRow()

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

◆ printResultSectionLinks()

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

Returns the anchor-links to the sections inside the displayed result rows.

Returns
string
Todo:
Define visibility

Definition at line 1496 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_classParam(), and TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL().

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

◆ printRules()

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

Print the searching rules

Returns
string Rules for the search
Todo:
Define visibility

Definition at line 1480 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 splitted into multiple words (eg. CJK will be!) the operator of the main word will remain.

Parameters
arraySearch word array
Returns
array Search word array, processed through lexer
Todo:
Define visibility

Definition at line 451 of file SearchFormController.php.

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

◆ renderSelectBox()

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

Makes a selector box

Parameters
stringName of selector box
stringCurrent value
arrayArray of options in the selector box (value => label pairs)
Returns
string HTML of selector box
Todo:
Define visibility

Definition at line 1776 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
stringCurrent value
arrayArray with the options as key=>value pairs
Returns
string <options> imploded.
Todo:
Define visibility

Definition at line 1459 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
pointer SQL result pointer
Todo:
Define visibility

Definition at line 927 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
Todo:
Define visibility

Definition at line 956 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)

Search for a sentence

Parameters
string$sSentenceSentence to search for
Returns
pointer SQL result pointer
Todo:
Define visibility

Definition at line 941 of file SearchFormController.php.

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

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

◆ searchWord()

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

Search for a word

Parameters
string$sWordWord to search for
integer$modeBit-field which can contain WILDCARD_LEFT and/or WILDCARD_RIGHT
Returns
pointer SQL result pointer
Todo:
Define visibility

Definition at line 911 of file SearchFormController.php.

References $GLOBALS, 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.
Todo:
Define visibility

Definition at line 968 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)
Todo:
Define visibility

Definition at line 2300 of file SearchFormController.php.

References $GLOBALS.

Referenced by 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
stringsearch word to wrap (in local charset!)
Returns
string Search word wrapped in tag.
Todo:
Define visibility

Definition at line 1763 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
arraySearch Word array
integerNumber of hits
integerMilliseconds the search took
Returns
void
Todo:
Define visibility

Definition at line 1288 of file SearchFormController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchFormController\$sWArr, 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 = array()
Todo:
Define visibility

Definition at line 92 of file SearchFormController.php.

◆ $cache_rl

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$cache_rl = array()
Todo:
Define visibility

Definition at line 98 of file SearchFormController.php.

◆ $defaultResultNumber

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$defaultResultNumber = 10
Todo:
Define visibility

Definition at line 56 of file SearchFormController.php.

◆ $domain_records

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$domain_records = array()
Todo:
Define visibility

Definition at line 110 of file SearchFormController.php.

◆ $enableMetaphoneSearch

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$enableMetaphoneSearch = FALSE
Todo:
Define visibility

Definition at line 157 of file SearchFormController.php.

◆ $external_parsers

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$external_parsers = array()
Todo:
Define visibility

Definition at line 128 of file SearchFormController.php.

◆ $extKey

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

Definition at line 44 of file SearchFormController.php.

◆ $fe_groups_required

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$fe_groups_required = array()
Todo:
Define visibility

Definition at line 104 of file SearchFormController.php.

◆ $firstRow

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$firstRow = array()

◆ $hiddenFieldList

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

Definition at line 146 of file SearchFormController.php.

◆ $iconFileNameCache

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$iconFileNameCache = array()
Todo:
Define visibility

Definition at line 134 of file SearchFormController.php.

◆ $indexerConfig

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$indexerConfig = array()
Todo:
Define visibility

Definition at line 151 of file SearchFormController.php.

◆ $join_pages

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

◆ $lexerObj

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

Definition at line 170 of file SearchFormController.php.

◆ $operator_translate_table

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$operator_translate_table = array(array('+', 'AND'), array('|', 'OR'), array('-', 'AND NOT'))

◆ $optValues

◆ $prefixId

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

Definition at line 32 of file SearchFormController.php.

◆ $resultSections

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$resultSections = array()
Todo:
Define visibility

Definition at line 122 of file SearchFormController.php.

◆ $scriptRelPath

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$scriptRelPath = 'pi/class.tx_indexedsearch.php'
Todo:
Define visibility

Definition at line 38 of file SearchFormController.php.

◆ $storeMetaphoneInfoAsWords

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$storeMetaphoneInfoAsWords
Todo:
Define visibility

Definition at line 162 of file SearchFormController.php.

◆ $sWArr

◆ $templateCode

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$templateCode
Todo:
Define visibility

Definition at line 140 of file SearchFormController.php.

◆ $wholeSiteIdList

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$wholeSiteIdList = 0
Todo:
Define visibility

Definition at line 67 of file SearchFormController.php.

◆ $wSelClauses

TYPO3\CMS\IndexedSearch\Controller\SearchFormController::$wSelClauses = array()
Todo:
Define visibility

Definition at line 116 of file SearchFormController.php.

◆ WILDCARD_LEFT

const TYPO3\CMS\IndexedSearch\Controller\SearchFormController::WILDCARD_LEFT = 1

Definition at line 172 of file SearchFormController.php.

◆ WILDCARD_RIGHT

const TYPO3\CMS\IndexedSearch\Controller\SearchFormController::WILDCARD_RIGHT = 2

Definition at line 173 of file SearchFormController.php.