TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SearchFormController Class Reference
Inheritance diagram for SearchFormController:
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)
 
 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=false, $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 AbstractPlugin
 pi_setPiVarDefaults ()
 
 pi_getPageLink ($id, $target= '', $urlParameters=array())
 
 pi_linkToPage ($str, $id, $target= '', $urlParameters=array())
 
 pi_linkTP ($str, $urlParameters=array(), $cache=false, $altPageId=0)
 
 pi_linkTP_keepPIvars ($str, $overrulePIvars=array(), $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_linkTP_keepPIvars_url ($overrulePIvars=array(), $cache=false, $clearAnyway=false, $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=array(), $tablename= '', $label= '', $conf=array())
 
 pi_getEditIcon ($content, $fields, $title= '', $row=array(), $tablename= '', $oConf=array())
 
 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 = 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
 
- Public Attributes inherited from 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

 checkExistence ($row)
 
 getSearchFormActionURL ()
 
 getSearchFormActionPidFromTS ()
 
 formatCreatedDate ($date)
 
 formatModifiedDate ($date)
 
 formatDate ($date, $tsKey, $defaultFormat)
 
 loadSettings ()
 
- Protected Member Functions inherited from AbstractPlugin
 applyStdWrapRecursive (array $conf, $level=0)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractPlugin
 $LOCAL_LANG_UNSET = array()
 
 $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 28 of file SearchFormController.php.

Member Function Documentation

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 1268 of file SearchFormController.php.

References SearchFormController\checkExistence(), and GeneralUtility\logDeprecatedFunction().

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

Definition at line 1281 of file SearchFormController.php.

Referenced by SearchFormController\checkExistance(), and SearchFormController\getResultRows().

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 1215 of file SearchFormController.php.

References IndexedSearchUtility\isTableUsed().

Referenced by SearchFormController\getResultRows().

compileResult (   $resultRows,
  $freeIndexUid = -1 
)

Takes the array with resultrows as input and returns the result-HTML-code Takes the "group" var into account: Makes a "section" or "flat" display.

Parameters
array$resultRowsResult rows
int$freeIndexUidPointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
string HTML

Definition at line 708 of file SearchFormController.php.

References elseif, SearchFormController\getPathFromPageId(), SearchFormController\makeSectionHeader(), AbstractPlugin\pi_classParam(), AbstractPlugin\pi_getLL(), SearchFormController\printResultRow(), and GeneralUtility\quoteJSvalue().

Referenced by SearchFormController\getDisplayResults().

doSearch (   $sWArr)

Performs the search, the display and writing stats

Parameters
array$sWArrSearch words in array, see ->getSearchWords() for details
Returns
string HTML for result display.

Definition at line 482 of file SearchFormController.php.

References SearchFormController\$sWArr, SearchFormController\getDisplayResults(), SearchFormController\getResultRows(), SearchFormController\hookRequest(), GeneralUtility\intExplode(), GeneralUtility\milliseconds(), AbstractPlugin\pi_getLL(), and SearchFormController\writeSearchStat().

Referenced by SearchFormController\main().

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 1112 of file SearchFormController.php.

References $list, elseif, SearchFormController\freeIndexUidWhere(), SearchFormController\hookRequest(), GeneralUtility\intExplode(), SearchFormController\isDescending(), SearchFormController\languageWhere(), and SearchFormController\mediaTypeWhere().

Referenced by SearchFormController\getResultRows_SQLpointer().

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 894 of file SearchFormController.php.

References SearchFormController\sectionTableWhere().

Referenced by SearchFormController\searchDistinct(), SearchFormController\searchMetaphone(), and SearchFormController\searchWord().

formatCreatedDate (   $date)
protected

Formats date as 'created' date

Parameters
int$date
Returns
string

Definition at line 2393 of file SearchFormController.php.

References $GLOBALS, and SearchFormController\formatDate().

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 2420 of file SearchFormController.php.

Referenced by SearchFormController\formatCreatedDate(), and SearchFormController\formatModifiedDate().

formatModifiedDate (   $date)
protected

Formats date as 'modified' date

Parameters
int$date
Returns
string

Definition at line 2405 of file SearchFormController.php.

References $GLOBALS, and SearchFormController\formatDate().

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 1070 of file SearchFormController.php.

References $list, GeneralUtility\revExplode(), and GeneralUtility\trimExplode().

Referenced by SearchFormController\execFinalQuery().

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 663 of file SearchFormController.php.

References $GLOBALS, SearchFormController\$sWArr, SearchFormController\compileResult(), MathUtility\forceIntegerInRange(), SearchFormController\getPathFromPageId(), AbstractPlugin\pi_classParam(), AbstractPlugin\pi_getLL(), SearchFormController\pi_list_browseresults(), SearchFormController\printResultSectionLinks(), and SearchFormController\tellUsWhatIsSeachedFor().

Referenced by SearchFormController\doSearch().

getFirstSysDomainRecordForPage (   $id)

Gets the first sys_domain record for the page, $id

Parameters
int$idPage id
Returns
string Domain name

Definition at line 2235 of file SearchFormController.php.

Referenced by SearchFormController\getPathFromPageId().

getJoinPagesForQuery ( )

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

Returns
bool

Definition at line 2458 of file SearchFormController.php.

References SearchFormController\$join_pages.

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 2299 of file SearchFormController.php.

Referenced by SearchFormController\initialize().

getPathFromPageId (   $id,
  $pathMP = '' 
)

Returns the path to the page $id

Parameters
int$idPage ID
string$pathMPMP variable content
Returns
string Path (HTML-escaped)

Definition at line 2249 of file SearchFormController.php.

References $GLOBALS, SearchFormController\getFirstSysDomainRecordForPage(), and SearchFormController\getRootLine().

Referenced by SearchFormController\compileResult(), SearchFormController\getDisplayResults(), and SearchFormController\linkPage().

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 SearchFormController\$firstRow, $GLOBALS, SearchFormController\checkExistence(), SearchFormController\checkResume(), MathUtility\forceIntegerInRange(), SearchFormController\getResultRows_SQLpointer(), SearchFormController\hookRequest(), and SearchFormController\multiplePagesType().

Referenced by SearchFormController\doSearch().

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 639 of file SearchFormController.php.

References $GLOBALS, $list, SearchFormController\$sWArr, and SearchFormController\execFinalQuery().

Referenced by SearchFormController\getResultRows().

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 2220 of file SearchFormController.php.

Referenced by SearchFormController\getPathFromPageId().

getSearchFormActionPidFromTS ( )
protected

Obtains search form target pid from the TypoScript configuration

Returns
int

Definition at line 2373 of file SearchFormController.php.

Referenced by SearchFormController\getSearchFormActionURL().

getSearchFormActionURL ( )
protected

Obtains the URL of the search target page

Returns
string

Definition at line 2359 of file SearchFormController.php.

References SearchFormController\getSearchFormActionPidFromTS(), and AbstractPlugin\pi_getPageLink().

Referenced by SearchFormController\makeSearchForm().

getSearchRootPageIdList ( )

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

Returns
int[]

Definition at line 2447 of file SearchFormController.php.

getSearchType ( )

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

Returns
int

Definition at line 2437 of file SearchFormController.php.

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 SearchFormController\hookRequest(), and SearchFormController\procSearchWordsByLexer().

Referenced by SearchFormController\initialize().

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 2113 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

hookRequest (   $functionName)

Returns an object reference to the hook object if any

Parameters
string$functionNameName of the function you want to call / hook key
Returns
object|NULL Hook object, if any. Otherwise NULL.

Definition at line 2342 of file SearchFormController.php.

References $GLOBALS, and GeneralUtility\getUserObj().

Referenced by SearchFormController\doSearch(), SearchFormController\execFinalQuery(), SearchFormController\getResultRows(), SearchFormController\getSearchWords(), SearchFormController\initialize(), SearchFormController\prepareResultRowTemplateData(), and SearchFormController\printResultRow().

initialize ( )
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 1300 of file SearchFormController.php.

Referenced by SearchFormController\execFinalQuery().

languageWhere ( )

Returns AND statement for selection of language

Returns
string AND statement for selection of language

Definition at line 1054 of file SearchFormController.php.

Referenced by SearchFormController\execFinalQuery().

linkPage (   $id,
  $str,
  $row = array(),
  $markUpSwParams = array() 
)

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 2175 of file SearchFormController.php.

References SearchFormController\getPathFromPageId().

Referenced by SearchFormController\prepareResultRowTemplateData().

loadSettings ( )
protected

Load settings and apply stdWrap to them

Definition at line 2466 of file SearchFormController.php.

References MathUtility\forceIntegerInRange().

Referenced by SearchFormController\initialize().

main (   $content,
  $conf 
)

Main function, called from TypoScript as a USER_INT object.

Parameters
string$contentContent input, ignore (just put blank string)
array$confTypoScript configuration of the plugin!
Returns
string HTML code for the search form / result display.

Definition at line 181 of file SearchFormController.php.

References AbstractPlugin\$conf, SearchFormController\doSearch(), SearchFormController\initialize(), SearchFormController\makeSearchForm(), AbstractPlugin\pi_setPiVarDefaults(), AbstractPlugin\pi_wrapInBaseClass(), and SearchFormController\printRules().

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 2157 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

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 1950 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

makeInfo (   $row,
  $tmplArray 
)

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

Parameters
array$rowResult row
array$tmplArrayTemplate array to modify
Returns
array Modified template array

Definition at line 2081 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

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 1856 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

makeLanguageIndication (   $row)

Returns the HTML code for language indication.

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

Definition at line 2137 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

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 1842 of file SearchFormController.php.

Referenced by SearchFormController\pi_list_browseresults().

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 1900 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

makeSearchForm (   $optValues)

Make search form HTML

Parameters
array$optValuesValue/Labels pairs for search form selector boxes.
Returns
string Search form HTML

Definition at line 1359 of file SearchFormController.php.

References SearchFormController\$optValues, SearchFormController\getSearchFormActionURL(), AbstractPlugin\pi_getLL(), AbstractPlugin\pi_getPageLink(), SearchFormController\renderSelectBoxValues(), GeneralUtility\strtoupper(), and GeneralUtility\trimExplode().

Referenced by SearchFormController\main().

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 1556 of file SearchFormController.php.

References AbstractPlugin\pi_getLL().

Referenced by SearchFormController\compileResult().

makeTitle (   $row)

Returns the title of the search result row

Parameters
array$rowResult row
Returns
string Title from row

Definition at line 2058 of file SearchFormController.php.

Referenced by SearchFormController\prepareResultRowTemplateData().

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 1987 of file SearchFormController.php.

mediaTypeWhere ( )

Returns AND statement for selection of media type

Returns
string AND statement for selection of media type

Definition at line 1028 of file SearchFormController.php.

Referenced by SearchFormController\execFinalQuery().

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 2320 of file SearchFormController.php.

Referenced by SearchFormController\getResultRows(), and SearchFormController\printResultRow().

pi_list_browseresults (   $showResultCount = true,
  $addString = '',
  $addPart = '',
  $freeIndexUid = -1 
)

Returns a results browser

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 1629 of file SearchFormController.php.

References elseif, MathUtility\forceIntegerInRange(), SearchFormController\makePointerSelector_link(), AbstractPlugin\pi_classParam(), and AbstractPlugin\pi_getLL().

Referenced by SearchFormController\getDisplayResults().

prepareResultRowTemplateData (   $row,
  $headerOnly 
)

Preparing template data for the result row output

Parameters
array$rowResult row
bool$headerOnlyIf set, display only header of result (for sub-results)
Returns
array Array with data to insert in result row template

Definition at line 1706 of file SearchFormController.php.

References SearchFormController\getSpecialConfigForRow(), SearchFormController\hookRequest(), SearchFormController\linkPage(), SearchFormController\makeAccessIndication(), SearchFormController\makeDescription(), SearchFormController\makeInfo(), SearchFormController\makeItemTypeIcon(), SearchFormController\makeLanguageIndication(), SearchFormController\makeRating(), and SearchFormController\makeTitle().

Referenced by SearchFormController\printResultRow().

printResultRow (   $row,
  $headerOnly = 0 
)

This prints a single result row, including a recursive call for subrows.

Parameters
array$rowSearch result row
int$headerOnly1=Display only header (for sub-rows!), 2=nothing at all
Returns
string HTML code

Definition at line 1574 of file SearchFormController.php.

References elseif, SearchFormController\hookRequest(), SearchFormController\multiplePagesType(), AbstractPlugin\pi_getLL(), SearchFormController\prepareResultRowTemplateData(), and GeneralUtility\strtoupper().

Referenced by SearchFormController\compileResult().

printResultSectionLinks ( )

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

Returns
string

Definition at line 1527 of file SearchFormController.php.

References $GLOBALS, GeneralUtility\getIndpEnv(), AbstractPlugin\pi_classParam(), and AbstractPlugin\pi_getLL().

Referenced by SearchFormController\getDisplayResults().

printRules ( )

Print the searching rules

Returns
string Rules for the search

Definition at line 1510 of file SearchFormController.php.

References AbstractPlugin\pi_getLL().

Referenced by SearchFormController\main().

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 SearchFormController\getSearchWords().

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 1817 of file SearchFormController.php.

References SearchFormController\$optValues.

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 1488 of file SearchFormController.php.

References SearchFormController\$optValues.

Referenced by SearchFormController\makeSearchForm().

searchDistinct (   $sWord)

Search for one distinct word

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

Definition at line 932 of file SearchFormController.php.

References SearchFormController\execPHashListQuery().

searchMetaphone (   $sWord)

Search for a metaphone word

Parameters
string$sWordWord to search for
Returns
SQL result pointer

Definition at line 968 of file SearchFormController.php.

References SearchFormController\execPHashListQuery().

searchSentence (   $sSentence)

Search for a sentence

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

Definition at line 946 of file SearchFormController.php.

References LikeWildcard\BOTH, and SearchFormController\sectionTableWhere().

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 912 of file SearchFormController.php.

References SearchFormController\execPHashListQuery().

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 980 of file SearchFormController.php.

References $GLOBALS, $list, elseif, and GeneralUtility\intExplode().

Referenced by SearchFormController\execPHashListQuery(), and SearchFormController\searchSentence().

tellUsWhatIsSeachedFor (   $sWArr)

Returns a string that tells which search words are searched for.

Parameters
arrayArray of search words
Returns
string HTML telling what is searched for.

Definition at line 1771 of file SearchFormController.php.

References SearchFormController\$sWArr, AbstractPlugin\pi_getLL(), SearchFormController\utf8_to_currentCharset(), and SearchFormController\wrapSW().

Referenced by SearchFormController\getDisplayResults().

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 2331 of file SearchFormController.php.

Referenced by SearchFormController\tellUsWhatIsSeachedFor().

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 1804 of file SearchFormController.php.

References AbstractPlugin\pi_classParam().

Referenced by SearchFormController\tellUsWhatIsSeachedFor().

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 1317 of file SearchFormController.php.

References $GLOBALS, SearchFormController\$sWArr, and GeneralUtility\getIndpEnv().

Referenced by SearchFormController\doSearch().

Member Data Documentation

$cache_path = array()

Definition at line 94 of file SearchFormController.php.

$cache_rl = array()

Definition at line 101 of file SearchFormController.php.

$defaultResultNumber = 10

Definition at line 52 of file SearchFormController.php.

$domain_records = array()

Definition at line 115 of file SearchFormController.php.

$enableMetaphoneSearch = false

Definition at line 163 of file SearchFormController.php.

$external_parsers = array()

Definition at line 135 of file SearchFormController.php.

$extKey = 'indexed_search'

Definition at line 42 of file SearchFormController.php.

$fe_groups_required = array()

Definition at line 108 of file SearchFormController.php.

$firstRow = array()

Definition at line 87 of file SearchFormController.php.

Referenced by SearchFormController\getResultRows().

$hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results'

Definition at line 151 of file SearchFormController.php.

$iconFileNameCache = array()

Definition at line 142 of file SearchFormController.php.

$indexerConfig = array()

Definition at line 158 of file SearchFormController.php.

$join_pages = 0

Definition at line 49 of file SearchFormController.php.

Referenced by SearchFormController\getJoinPagesForQuery().

$lexerObj

Definition at line 172 of file SearchFormController.php.

$operator_translate_table = array(array('+', 'AND'), array('|', 'OR'), array('-', 'AND NOT'))

Definition at line 59 of file SearchFormController.php.

$optValues = array()
$prefixId = 'tx_indexedsearch'

Definition at line 35 of file SearchFormController.php.

$resultSections = array()

Definition at line 129 of file SearchFormController.php.

$storeMetaphoneInfoAsWords

Definition at line 165 of file SearchFormController.php.

$sWArr = array()
$templateCode = ''

Definition at line 149 of file SearchFormController.php.

$wholeSiteIdList = 0

Definition at line 66 of file SearchFormController.php.

$wSelClauses = array()

Definition at line 122 of file SearchFormController.php.