protected function preAddModifyDocuments(Item $item, $language, array $documents)
    {
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments'] as $classReference) {
                $documentsModifier = GeneralUtility::makeInstance($classReference);

                if ($documentsModifier instanceof PageIndexerDocumentsModifier) {
                    $documents = $documentsModifier->modifyDocuments($item, $language, $documents);
                } else {
                    throw new \RuntimeException(
                        'The class "' . get_class($documentsModifier)
                        . '" registered as document modifier in hook
							preAddModifyDocuments must implement interface
							ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier',
                        1309522677
                    );
                }
            }
        }

        return $documents;
    }
protected function preAddModifyDocuments(Item $item, $language, array $documents)
    {
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments'] as $classReference) {
                $documentsModifier = GeneralUtility::makeInstance($classReference);

                if ($documentsModifier instanceof PageIndexerDocumentsModifier) {
                    $documents = $documentsModifier->modifyDocuments($item, $language, $documents);
                } else {
                    throw new \RuntimeException(
                        'The class "' . get_class($documentsModifier)
                        . '" registered as document modifier in hook
							preAddModifyDocuments must implement interface
							ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier',
                        1309522677
                    );
                }
            }
        }

        return $documents;
    }
protected function preAddModifyDocuments ( Item $ item , $ language , array $ documents ) { if ( is_array ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'solr' ] [ 'IndexQueueIndexer' ] [ 'preAddModifyDocuments' ] ) ) { foreach ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'solr' ] [ 'IndexQueueIndexer' ] [ 'preAddModifyDocuments' ] as $ classReference ) { $ documentsModifier = GeneralUtility :: makeInstance ( $ classReference ) ; if ( $ documentsModifier instanceof PageIndexerDocumentsModifier ) { $ documents = $ documentsModifier -> modifyDocuments ( $ item , $ language , $ documents ) ; } else { throw new \ RuntimeException ( 'The class "' . get_class ( $ documentsModifier ) . '" registered as document modifier in hook
							preAddModifyDocuments must implement interface
							ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier' , 1309522677 ) ; } } } return $ documents ; }
Provides a hook to manipulate documents right before they get added to
the Solr index.

@param Item $item The item currently being indexed.
@param int $language The language uid of the documents
@param array $documents An array of documents to be indexed
@return array An array of modified documents
Provides a hook to manipulate documents right before they get added to the Solr index .