mirror of
https://github.com/Codappix/search_core.git
synced 2025-01-11 06:36:10 +01:00
[TASK] Make sure CGL is correct
This commit is contained in:
parent
6e492d2bdb
commit
a3ccc123c4
6 changed files with 44 additions and 11 deletions
|
@ -132,7 +132,11 @@ class SearchResult implements SearchResultInterface
|
|||
$this->facets = [];
|
||||
if ($this->result->hasAggregations()) {
|
||||
foreach ($this->result->getAggregations() as $aggregationName => $aggregation) {
|
||||
$this->facets[$aggregationName] = $this->objectManager->get(Facet::class, $aggregationName, $aggregation);
|
||||
$this->facets[$aggregationName] = $this->objectManager->get(
|
||||
Facet::class,
|
||||
$aggregationName,
|
||||
$aggregation
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,10 @@ class TcaTableService implements TcaTableServiceInterface
|
|||
$record['search_title'] = $record[$this->tca['ctrl']['label']];
|
||||
}
|
||||
|
||||
if (isset($this->tca['ctrl']['enablecolumns']['fe_group'], $record[$this->tca['ctrl']['enablecolumns']['fe_group']])) {
|
||||
if (isset(
|
||||
$this->tca['ctrl']['enablecolumns']['fe_group'],
|
||||
$record[$this->tca['ctrl']['enablecolumns']['fe_group']]
|
||||
)) {
|
||||
$groups = GeneralUtility::intExplode(
|
||||
',',
|
||||
$record[$this->tca['ctrl']['enablecolumns']['fe_group']],
|
||||
|
|
|
@ -125,7 +125,11 @@ class QueryFactory
|
|||
];
|
||||
|
||||
try {
|
||||
$fieldsToQuery = GeneralUtility::trimExplode(',', $this->configuration->get('searching.fields.query'), true);
|
||||
$fieldsToQuery = GeneralUtility::trimExplode(
|
||||
',',
|
||||
$this->configuration->get('searching.fields.query'),
|
||||
true
|
||||
);
|
||||
if ($fieldsToQuery !== []) {
|
||||
$matchExpression['fields'] = $fieldsToQuery;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,9 @@ class TcaRelationResolvingProcessorTest extends AbstractFunctionalTestCase
|
|||
*/
|
||||
public function resolveInlineRelation()
|
||||
{
|
||||
$this->importDataSet('EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/InlineRelation.xml');
|
||||
$this->importDataSet(
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/InlineRelation.xml'
|
||||
);
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$table = 'sys_file';
|
||||
|
||||
|
@ -56,7 +58,9 @@ class TcaRelationResolvingProcessorTest extends AbstractFunctionalTestCase
|
|||
*/
|
||||
public function resolveStaticSelectItems()
|
||||
{
|
||||
$this->importDataSet('EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/StaticSelectItems.xml');
|
||||
$this->importDataSet(
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/StaticSelectItems.xml'
|
||||
);
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$table = 'tt_content';
|
||||
|
||||
|
@ -75,7 +79,9 @@ class TcaRelationResolvingProcessorTest extends AbstractFunctionalTestCase
|
|||
*/
|
||||
public function resolveForeignDb()
|
||||
{
|
||||
$this->importDataSet('EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/ForeignDb.xml');
|
||||
$this->importDataSet(
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/ForeignDb.xml'
|
||||
);
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$table = 'tt_content';
|
||||
|
||||
|
@ -97,7 +103,9 @@ class TcaRelationResolvingProcessorTest extends AbstractFunctionalTestCase
|
|||
*/
|
||||
public function resolveForeignMmSelect()
|
||||
{
|
||||
$this->importDataSet('EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/ForeignMmSelect.xml');
|
||||
$this->importDataSet(
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RelationResolver/ForeignMmSelect.xml'
|
||||
);
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$table = 'tt_content';
|
||||
|
||||
|
|
|
@ -96,12 +96,21 @@ class PagesIndexerTest extends AbstractFunctionalTestCase
|
|||
$indexer->indexAllDocuments();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function rootLineDataSets()
|
||||
{
|
||||
return [
|
||||
'Broken root line' => ['EXT:search_core/Tests/Functional/Fixtures/Indexing/PagesIndexer/BrokenRootLine.xml'],
|
||||
'Recycler doktype' => ['EXT:search_core/Tests/Functional/Fixtures/Indexing/PagesIndexer/Recycler.xml'],
|
||||
'Extended timing to sub pages' => ['EXT:search_core/Tests/Functional/Fixtures/Indexing/PagesIndexer/InheritedTiming.xml'],
|
||||
'Broken root line' => [
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/PagesIndexer/BrokenRootLine.xml'
|
||||
],
|
||||
'Recycler doktype' => [
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/PagesIndexer/Recycler.xml'
|
||||
],
|
||||
'Extended timing to sub pages' => [
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/PagesIndexer/InheritedTiming.xml'
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,9 @@ use TYPO3\CMS\Extbase\Object\ObjectManager;
|
|||
|
||||
class TcaIndexerTest extends AbstractFunctionalTestCase
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function getTypoScriptFilesForFrontendRootPage()
|
||||
{
|
||||
return array_merge(
|
||||
|
@ -44,7 +47,9 @@ class TcaIndexerTest extends AbstractFunctionalTestCase
|
|||
*/
|
||||
public function respectRootLineBlacklist()
|
||||
{
|
||||
$this->importDataSet('EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RespectRootLineBlacklist.xml');
|
||||
$this->importDataSet(
|
||||
'EXT:search_core/Tests/Functional/Fixtures/Indexing/TcaIndexer/RespectRootLineBlacklist.xml'
|
||||
);
|
||||
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$tableName = 'tt_content';
|
||||
$tableService = $objectManager->get(
|
||||
|
|
Loading…
Reference in a new issue