-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
!!![TASK] Pass pages to preAddModifyDocuments hook
Now the preAddModifyDocuments hook is called for pages as well. Also the indexPagePostProcessPageDocument hook is deprecated and superseeded by: ``` $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer'] ['preAddModifyDocuments'] ``` Fixes: #2285 Ports: #3076
- Loading branch information
Showing
9 changed files
with
82 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
Tests/Integration/IndexQueue/FrontendHelper/TestPageIndexerDocumentsModifier.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace ApacheSolrForTypo3\Solr\Tests\Integration\IndexQueue\FrontendHelper; | ||
|
||
use ApacheSolrForTypo3\Solr\IndexQueue\Item; | ||
use ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier; | ||
use ApacheSolrForTypo3\Solr\System\Solr\Document\Document; | ||
|
||
class TestPageIndexerDocumentsModifier implements PageIndexerDocumentsModifier | ||
{ | ||
/** | ||
* Allows Modification of the Documents before they go into index | ||
* | ||
* @param Item $item | ||
* @param int $language | ||
* @param Document[] $documents | ||
* @return array|void | ||
*/ | ||
public function modifyDocuments(Item $item, int $language, array $documents) | ||
{ | ||
foreach ($documents as $document) { | ||
$document->addField('postProcessorField_stringS', 'postprocessed'); | ||
} | ||
|
||
return $documents; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters