‪TYPO3CMS  10.4
TYPO3\CMS\IndexedSearch\Controller\SearchController Class Reference
Inheritance diagram for TYPO3\CMS\IndexedSearch\Controller\SearchController:
TYPO3\CMS\Extbase\Mvc\Controller\ActionController TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface

Public Member Functions

 injectTypoScriptService (TypoScriptService $typoScriptService)
 
array initialize ($searchData=[])
 
 searchAction ($search=[])
 
string makeItemTypeIcon ($imageType, $alt, $specRowConf)
 
 formAction ($search=[])
 
 noTypoScriptAction ()
 
 setSword ($sword)
 
string getSword ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectSignalSlotDispatcher (Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectCacheService (CacheService $cacheService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 initializeControllerArgumentsBaseValidators ()
 
 processRequest (RequestInterface $request, ResponseInterface $response)
 
ControllerContext getControllerContext ()
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
 
bool canProcessRequest (RequestInterface $request)
 
 forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
 throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

array getDisplayResults ($searchWords, $resultData, $freeIndexUid=-1)
 
array compileResultRows ($resultRows, $freeIndexUid=-1)
 
array compileSingleResultRow ($row, $headerOnly=0)
 
array getSpecialConfigurationForResultRow ($row)
 
string makeRating ($row)
 
string makeLanguageIndication ($row)
 
string makeDescription ($row, $noMarkup=false, $length=180)
 
string markupSWpartsOfString ($str)
 
 writeSearchStat ($searchParams, $searchWords, $count, $pt)
 
array getSearchWords ($defaultOperator)
 
array procSearchWordsByLexer ($searchWords)
 
array getAllAvailableSearchTypeOptions ()
 
array getAllAvailableOperandsOptions ()
 
array getAllAvailableMediaTypesOptions ()
 
array getAllAvailableLanguageOptions ()
 
array getAllAvailableSectionsOptions ()
 
array getAllAvailableIndexConfigurationsOptions ()
 
array getAllAvailableSortOrderOptions ()
 
array getAllAvailableGroupOptions ()
 
array getAllAvailableSortDescendingOptions ()
 
array getAllAvailableNumberOfResultsOptions ()
 
array removeOptionsFromOptionList ($allOptions, $blindOptions)
 
array linkPage ($pageUid, $row=[], $markUpSwParams=[])
 
array getMenuOfPages ($pageUid)
 
string getPathFromPageId ($id, $pathMP='')
 
string getFirstDomainForPage (int $id)
 
 initializeExternalParsers ()
 
object null hookRequest ($functionName)
 
bool multiplePagesType ($item_type)
 
array processExtendedSearchParameters ()
 
 loadSettings ()
 
int getNumberOfResults ($numberOfResults)
 
array preparePageLink (int $pageUid, array $row, array $urlParameters)
 
string linkPageATagWrap (string $linkText, array $linkData)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
 initializeView (ViewInterface $view)
 
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest ($request)
 
string resolveActionMethodName ()
 
 callActionMethod ()
 
 emitBeforeCallActionMethodSignal (array $preparedArguments)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
string errorAction ()
 
 clearCacheOnError ()
 
 addErrorFlashMessage ()
 
string getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
TYPO3 CMS Extbase Mvc Controller ControllerContext buildControllerContext ()
 
 redirect ($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $delay=0, $statusCode=303)
 
 redirectToUri ($uri, $delay=0, $statusCode=303)
 
string addBaseUriIfNecessary ($uri)
 
 mapRequestArgumentsToControllerArguments ()
 

Protected Attributes

string $sword = ''
 
array $searchWords = array( )
 
array $searchData
 
int string $searchRootPageIdList = 0
 
int $defaultResultNumber = 10
 
int[] $availableResultsNumbers = array( )
 
TYPO3 CMS IndexedSearch Domain Repository IndexSearchRepository $searchRepository
 
TYPO3 CMS IndexedSearch Lexer $lexerObj
 
array $externalParsers = array( )
 
array $firstRow = array( )
 
array $domainRecords = array( )
 
array $requiredFrontendUsergroups = array( )
 
array $resultSections = array( )
 
array $pathCache = array( )
 
array $iconFileNameCache = array( )
 
array $indexerConfig = array( )
 
bool $enableMetaphoneSearch = false
 
TYPO3 CMS Core TypoScript TypoScriptService $typoScriptService
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
TYPO3 CMS Extbase Service CacheService $cacheService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
TYPO3 CMS Extbase Mvc Request $request
 
TYPO3 CMS Extbase Mvc Response $response
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
 
array $settings
 
TYPO3 CMS Extbase Validation ValidatorResolver $validatorResolver
 
TYPO3 CMS Extbase Mvc Controller Arguments $arguments
 
array $supportedRequestTypes = array( Request::class )
 
TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Detailed Description

Index search frontend

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

This class is a specific controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 50 of file SearchController.php.

Member Function Documentation

◆ compileResultRows()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::compileResultRows (   $resultRows,
  $freeIndexUid = -1 
)
protected

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$resultRows‪Result rows
int$freeIndexUid‪Pointing to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
‪array the result rows with additional information

Definition at line 368 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow(), TYPO3\CMS\IndexedSearch\Controller\SearchController\getPathFromPageId(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

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

◆ compileSingleResultRow()

◆ formAction()

TYPO3\CMS\IndexedSearch\Controller\SearchController::formAction (   $search = [])

◆ getAllAvailableGroupOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableGroupOptions ( )
protected

◆ getAllAvailableIndexConfigurationsOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableIndexConfigurationsOptions ( )
protected

◆ getAllAvailableLanguageOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableLanguageOptions ( )
protected

◆ getAllAvailableMediaTypesOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableMediaTypesOptions ( )
protected

◆ getAllAvailableNumberOfResultsOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableNumberOfResultsOptions ( )
protected

get the values for the "results" selector

Returns
‪array Associative array with options

Definition at line 1291 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\removeOptionsFromOptionList().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\processExtendedSearchParameters().

◆ getAllAvailableOperandsOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableOperandsOptions ( )
protected

◆ getAllAvailableSearchTypeOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableSearchTypeOptions ( )
protected

◆ getAllAvailableSectionsOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableSectionsOptions ( )
protected

get the values for the "section" selector Here values like "rl1_" and "rl2_" + a rootlevel 1/2 id can be added to perform searches in rootlevel 1+2 specifically. The id-values can even be commaseparated. Eg. "rl1_1,2" would search for stuff inside pages on menu-level 1 which has the uid's 1 and 2.

Returns
‪array Associative array with options

Definition at line 1136 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\getMenuOfPages(), TYPO3\CMS\IndexedSearch\Controller\SearchController\removeOptionsFromOptionList(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\processExtendedSearchParameters().

◆ getAllAvailableSortDescendingOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableSortDescendingOptions ( )
protected

◆ getAllAvailableSortOrderOptions()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getAllAvailableSortOrderOptions ( )
protected

get the values for the "section" selector Here values like "rl1_" and "rl2_" + a rootlevel 1/2 id can be added to perform searches in rootlevel 1+2 specifically. The id-values can even be commaseparated. Eg. "rl1_1,2" would search for stuff inside pages on menu-level 1 which has the uid's 1 and 2.

Returns
‪array Associative array with options

Definition at line 1231 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\removeOptionsFromOptionList(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\processExtendedSearchParameters().

◆ getDisplayResults()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getDisplayResults (   $searchWords,
  $resultData,
  $freeIndexUid = -1 
)
protected

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

Parameters
array$searchWords‪Search words array (for display of text describing what was searched for)
array$resultData‪Array with result rows, count, first row.
int$freeIndexUid‪Pointing to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Returns
‪array

Definition at line 326 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\$resultSections, TYPO3\CMS\IndexedSearch\Controller\SearchController\$searchWords, TYPO3\CMS\IndexedSearch\Controller\SearchController\compileResultRows(), TYPO3\CMS\IndexedSearch\Controller\SearchController\getPathFromPageId(), TYPO3\CMS\IndexedSearch\Controller\SearchController\hookRequest(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\searchAction().

◆ getFirstDomainForPage()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::getFirstDomainForPage ( int  $id)
protected

Gets the first domain for the page

Parameters
int$id‪Page id
Returns
‪string Domain name

Definition at line 1436 of file SearchController.php.

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

◆ getMenuOfPages()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getMenuOfPages (   $pageUid)
protected

Return the menu of pages used for the selector.

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

Definition at line 1361 of file SearchController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\getAllAvailableSectionsOptions().

◆ getNumberOfResults()

int TYPO3\CMS\IndexedSearch\Controller\SearchController::getNumberOfResults (   $numberOfResults)
protected

Returns number of results to display

Parameters
int$numberOfResults‪Requested number of results
Returns
‪int

Definition at line 1590 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\$defaultResultNumber.

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

◆ getPathFromPageId()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::getPathFromPageId (   $id,
  $pathMP = '' 
)
protected

◆ getSearchWords()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getSearchWords (   $defaultOperator)
protected

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$defaultOperator‪If TRUE, the default operator will be OR, not AND
Returns
‪array Search words if any found

Definition at line 909 of file SearchController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchController\$searchWords, TYPO3\CMS\IndexedSearch\Utility\IndexedSearchUtility\getExplodedSearchString(), TYPO3\CMS\IndexedSearch\Controller\SearchController\getSword(), TYPO3\CMS\IndexedSearch\Controller\SearchController\hookRequest(), TYPO3\CMS\IndexedSearch\Controller\SearchController\procSearchWordsByLexer(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

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

◆ getSpecialConfigurationForResultRow()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::getSpecialConfigurationForResultRow (   $row)
protected

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

Parameters
array$row‪Result row
Returns
‪array Configuration array

Definition at line 580 of file SearchController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ getSword()

◆ hookRequest()

object null TYPO3\CMS\IndexedSearch\Controller\SearchController::hookRequest (   $functionName)
protected

Returns an object reference to the hook object if any

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

Definition at line 1472 of file SearchController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\getDisplayResults(), TYPO3\CMS\IndexedSearch\Controller\SearchController\getSearchWords(), TYPO3\CMS\IndexedSearch\Controller\SearchController\initialize(), and TYPO3\CMS\IndexedSearch\Controller\SearchController\searchAction().

◆ initialize()

◆ initializeExternalParsers()

TYPO3\CMS\IndexedSearch\Controller\SearchController::initializeExternalParsers ( )
protected

simple function to initialize possible external parsers feeds the $this->externalParsers array

Definition at line 1454 of file SearchController.php.

References $GLOBALS.

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

◆ injectTypoScriptService()

TYPO3\CMS\IndexedSearch\Controller\SearchController::injectTypoScriptService ( TypoScriptService  $typoScriptService)
Parameters
\TYPO3\CMS\Core\TypoScript\TypoScriptService$typoScriptService

Definition at line 156 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\$typoScriptService.

◆ linkPage()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::linkPage (   $pageUid,
  $row = [],
  $markUpSwParams = [] 
)
protected

Links the $linkText to page $pageUid

Parameters
int$pageUid‪Page id
array$row‪Result row
array$markUpSwParams‪Additional parameters for marking up search words
Returns
‪array

Definition at line 1329 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\getPathFromPageId(), and TYPO3\CMS\IndexedSearch\Controller\SearchController\preparePageLink().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ linkPageATagWrap()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::linkPageATagWrap ( string  $linkText,
array  $linkData 
)
protected

Create a tag for "path" key in search result

Parameters
string$linkText‪Link text (nodeValue)
array$linkData
Returns
‪string HTML tag wrapped title string.

Definition at line 1634 of file SearchController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ loadSettings()

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

Load settings and apply stdWrap to them

Definition at line 1532 of file SearchController.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

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

◆ makeDescription()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::makeDescription (   $row,
  $noMarkup = false,
  $length = 180 
)
protected

Returns the resume for the search-result.

Parameters
array$row‪Search result row
bool$noMarkup‪If 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$length‪String length
Returns
‪string HTML string
Todo:
‪overwork this

Definition at line 724 of file SearchController.php.

References $output, TYPO3\CMS\IndexedSearch\Controller\SearchController\markupSWpartsOfString(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ makeItemTypeIcon()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::makeItemTypeIcon (   $imageType,
  $alt,
  $specRowConf 
)

Return icon for file extension

Parameters
string$imageType‪File extension / item type
string$alt‪Title attribute value in icon.
array$specRowConf‪TypoScript configuration specifically for search result.
Returns
‪string HTML tag for icon

Definition at line 669 of file SearchController.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ makeLanguageIndication()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::makeLanguageIndication (   $row)
protected

Returns the HTML code for language indication.

Parameters
array$row‪Result row
Returns
‪string HTML code for result row.

Definition at line 644 of file SearchController.php.

References $output.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ makeRating()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::makeRating (   $row)
protected

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

Parameters
array$row‪Result row array
Returns
‪string String showing ranking value
Todo:
‪can this be a ViewHelper?

Definition at line 607 of file SearchController.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), and TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate().

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ markupSWpartsOfString()

string TYPO3\CMS\IndexedSearch\Controller\SearchController::markupSWpartsOfString (   $str)
protected

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

Parameters
string$str‪Text 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 765 of file SearchController.php.

References $output, and TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

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

◆ multiplePagesType()

bool TYPO3\CMS\IndexedSearch\Controller\SearchController::multiplePagesType (   $item_type)
protected

Returns if an item type is a multipage item type

Parameters
string$item_type‪Item type
Returns
‪bool TRUE if multipage capable

Definition at line 1491 of file SearchController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\compileSingleResultRow().

◆ noTypoScriptAction()

TYPO3\CMS\IndexedSearch\Controller\SearchController::noTypoScriptAction ( )

TypoScript was not loaded

Definition at line 1006 of file SearchController.php.

◆ preparePageLink()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::preparePageLink ( int  $pageUid,
array  $row,
array  $urlParameters 
)
protected

Internal method to build the page uri and link target.

Todo:
‪make use of the UriBuilder
Parameters
int$pageUid
array$row
array$urlParameters
Returns
‪array

Definition at line 1607 of file SearchController.php.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\linkPage().

◆ processExtendedSearchParameters()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::processExtendedSearchParameters ( )
protected

◆ procSearchWordsByLexer()

array TYPO3\CMS\IndexedSearch\Controller\SearchController::procSearchWordsByLexer (   $searchWords)
protected

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
array$searchWords‪Search word array
Returns
‪array Search word array, processed through lexer

Definition at line 959 of file SearchController.php.

References $GLOBALS, and TYPO3\CMS\IndexedSearch\Controller\SearchController\$searchWords.

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

◆ removeOptionsFromOptionList()

◆ searchAction()

◆ setSword()

TYPO3\CMS\IndexedSearch\Controller\SearchController::setSword (   $sword)

Set the search word

Parameters
string$sword

Definition at line 1653 of file SearchController.php.

References TYPO3\CMS\IndexedSearch\Controller\SearchController\$sword.

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

◆ writeSearchStat()

TYPO3\CMS\IndexedSearch\Controller\SearchController::writeSearchStat (   $searchParams,
  $searchWords,
  $count,
  $pt 
)
protected

Write statistics information to database for the search operation if there was at least one search word.

Parameters
array$searchParams‪search params
array$searchWords‪Search Word array
int$count‪Number of hits
array$pt‪Milliseconds the search took (start time DB query + end time DB query + end time to compile results)

Definition at line 844 of file SearchController.php.

References $GLOBALS, TYPO3\CMS\IndexedSearch\Controller\SearchController\$searchWords, TYPO3\CMS\Core\Utility\IpAnonymizationUtility\anonymizeIp(), TYPO3\CMS\IndexedSearch\Controller\SearchController\getSword(), and TYPO3\CMS\Core\Database\Connection\PARAM_LOB.

Referenced by TYPO3\CMS\IndexedSearch\Controller\SearchController\searchAction().

Member Data Documentation

◆ $availableResultsNumbers

int [] TYPO3\CMS\IndexedSearch\Controller\SearchController::$availableResultsNumbers = array( )
protected

Definition at line 82 of file SearchController.php.

◆ $defaultResultNumber

int TYPO3\CMS\IndexedSearch\Controller\SearchController::$defaultResultNumber = 10
protected

◆ $domainRecords

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$domainRecords = array( )
protected

sys_domain records

Definition at line 111 of file SearchController.php.

◆ $enableMetaphoneSearch

bool TYPO3\CMS\IndexedSearch\Controller\SearchController::$enableMetaphoneSearch = false
protected

Flag whether metaphone search should be enabled

Definition at line 147 of file SearchController.php.

◆ $externalParsers

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$externalParsers = array( )
protected

External parser objects

Definition at line 99 of file SearchController.php.

◆ $firstRow

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

Will hold the first row in result - used to calculate relative hit-ratings.

Definition at line 105 of file SearchController.php.

◆ $iconFileNameCache

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$iconFileNameCache = array( )
protected

Storage of icons

Definition at line 135 of file SearchController.php.

◆ $indexerConfig

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$indexerConfig = array( )
protected

Indexer configuration, coming from TYPO3's system configuration for EXT:indexed_search

Definition at line 141 of file SearchController.php.

◆ $lexerObj

TYPO3 CMS IndexedSearch Lexer TYPO3\CMS\IndexedSearch\Controller\SearchController::$lexerObj
protected

Lexer object

Definition at line 94 of file SearchController.php.

◆ $pathCache

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$pathCache = array( )
protected

Caching of page path

Definition at line 129 of file SearchController.php.

◆ $requiredFrontendUsergroups

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$requiredFrontendUsergroups = array( )
protected

Required fe_groups memberships for display of a result.

Definition at line 117 of file SearchController.php.

◆ $resultSections

array TYPO3\CMS\IndexedSearch\Controller\SearchController::$resultSections = array( )
protected

Page tree sections for search result.

Definition at line 123 of file SearchController.php.

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

◆ $searchData

◆ $searchRepository

TYPO3 CMS IndexedSearch Domain Repository IndexSearchRepository TYPO3\CMS\IndexedSearch\Controller\SearchController::$searchRepository
protected

Search repository

Definition at line 88 of file SearchController.php.

◆ $searchRootPageIdList

int string TYPO3\CMS\IndexedSearch\Controller\SearchController::$searchRootPageIdList = 0
protected

This is the id of the site root. This value may be a comma separated list of integer (prepared for this) Root-page PIDs to search in (rl0 field where clause, see initialize() function)

If this value is set to less than zero (eg. -1) searching will happen in ALL of the page tree with no regard to branches at all.

Definition at line 74 of file SearchController.php.

◆ $searchWords

◆ $sword

string TYPO3\CMS\IndexedSearch\Controller\SearchController::$sword = ''
protected

◆ $typoScriptService

TYPO3 CMS Core TypoScript TypoScriptService TYPO3\CMS\IndexedSearch\Controller\SearchController::$typoScriptService
protected