1 | <?php |
||
36 | class AnalysisComponent extends AbstractComponent implements QueryAware |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Solr query |
||
41 | * |
||
42 | * @var Query |
||
43 | */ |
||
44 | protected $query; |
||
45 | |||
46 | /** |
||
47 | * Initializes the search component. |
||
48 | * |
||
49 | * |
||
50 | */ |
||
51 | 25 | public function initializeSearchComponent() |
|
52 | { |
||
53 | 25 | if ($this->searchConfiguration['results.']['showDocumentScoreAnalysis']) { |
|
54 | 21 | $this->query->setDebugMode(); |
|
55 | 21 | $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifyResultDocument']['scoreAnalysis'] = ScoreAnalyzer::class; |
|
56 | 21 | $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifySearchForm']['queryAnalysis'] = QueryAnalyzerFormModifier::class; |
|
57 | } |
||
58 | 25 | } |
|
59 | |||
60 | /** |
||
61 | * Provides the extension component with an instance of the current query. |
||
62 | * |
||
63 | * @param Query $query Current query |
||
64 | */ |
||
65 | 25 | public function setQuery(Query $query) |
|
69 | } |
||
70 |