\searchIndexer

Summary

Methods
Properties
Constants
prepareData()
render()
getType()
indexItem()
unindexItem()
registerIndex()
rebuildIndex()
highlightWords()
$section
$moduleName
$subModuleName
$numDemandesModeration
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$moduleKey
$moduleType
$action
$indexedClasses
N/A

Properties

$section

$section : 

Type

$moduleName

$moduleName : 

Type

$subModuleName

$subModuleName : 

Type

$numDemandesModeration

$numDemandesModeration : 

Type

$moduleKey

$moduleKey : 

Type

$moduleType

$moduleType : 

Type

$action

$action : 

Type

$indexedClasses

$indexedClasses : 

Type

Methods

prepareData()

prepareData() : mixed

Launches the data processing step of all modules, executing their own prepareData() function

Returns

mixed

render()

render(  $mainTemplate) : mixed

Launches the rendering step of all modules, executing their own render() function

Parameters

$mainTemplate

Returns

mixed

getType()

getType() : string

must return one or several plugin types separated by comas current possible values are "backend, frontend, authentification"

Returns

string —

coma separated list of current module execution context types

indexItem()

indexItem(  $record,   $title,   $digest,   $tags,   $ressourceUrl) 

adds or updates an item to the search index. This function should be called in the postStore() and postRestore() functions of the related dbRecord instance

Parameters

$record

the dbRecord subclass to index

$title

the title of the ressource wich will appear in the search results

$digest

a prepared plain text digest of the text data to be indexed. HTML tags must be stripped out !

$tags

semantics tags associated with the record entry, separated by comas or spaces

$ressourceUrl

relative path including url parameters from the website root used to access the page holding the record data

unindexItem()

unindexItem(  $record) 

deleted an item from the search index. This function should be called in the postDelete() function of the related dbRecord instance

Parameters

$record

the dbRecord subclass to remove from the index

registerIndex()

registerIndex(  $recordClassName) 

adds a dbRecord Class to the indexer. This will make its indexAll() function called each time the index is rebuilt.

call this function in the constructor of your class

Parameters

$recordClassName

rebuildIndex()

rebuildIndex() 

highlightWords()

highlightWords(string  $text, array  $words) : string

Returns the given text with tags to highlight the specified words.

Parameters

string $text
array $words

Returns

string