protected function getAdditionalDocuments(Item $item, $language, Document $itemDocument)
    {
        $documents = [];

        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments'] as $classReference) {
                if (!class_exists($classReference)) {
                    throw new \InvalidArgumentException('Class does not exits' . $classReference, 1490363487);
                }
                $additionalIndexer = GeneralUtility::makeInstance($classReference);
                if ($additionalIndexer instanceof AdditionalIndexQueueItemIndexer) {
                    $additionalDocuments = $additionalIndexer->getAdditionalItemDocuments($item, $language, $itemDocument);

                    if (is_array($additionalDocuments)) {
                        $documents = array_merge($documents,
                            $additionalDocuments);
                    }
                } else {
                    throw new \UnexpectedValueException(
                        get_class($additionalIndexer) . ' must implement interface ' . AdditionalIndexQueueItemIndexer::class,
                        1326284551
                    );
                }
            }
        }
        return $documents;
    }
protected function getAdditionalDocuments(Item $item, $language, Document $itemDocument)
    {
        $documents = [];

        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments'] as $classReference) {
                if (!class_exists($classReference)) {
                    throw new \InvalidArgumentException('Class does not exits' . $classReference, 1490363487);
                }
                $additionalIndexer = GeneralUtility::makeInstance($classReference);
                if ($additionalIndexer instanceof AdditionalIndexQueueItemIndexer) {
                    $additionalDocuments = $additionalIndexer->getAdditionalItemDocuments($item, $language, $itemDocument);

                    if (is_array($additionalDocuments)) {
                        $documents = array_merge($documents,
                            $additionalDocuments);
                    }
                } else {
                    throw new \UnexpectedValueException(
                        get_class($additionalIndexer) . ' must implement interface ' . AdditionalIndexQueueItemIndexer::class,
                        1326284551
                    );
                }
            }
        }
        return $documents;
    }
protected function getAdditionalDocuments ( Item $ item , $ language , Document $ itemDocument ) { $ documents = [ ] ; if ( is_array ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'solr' ] [ 'IndexQueueIndexer' ] [ 'indexItemAddDocuments' ] ) ) { foreach ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'solr' ] [ 'IndexQueueIndexer' ] [ 'indexItemAddDocuments' ] as $ classReference ) { if ( ! class_exists ( $ classReference ) ) { throw new \ InvalidArgumentException ( 'Class does not exits' . $ classReference , 1490363487 ) ; } $ additionalIndexer = GeneralUtility :: makeInstance ( $ classReference ) ; if ( $ additionalIndexer instanceof AdditionalIndexQueueItemIndexer ) { $ additionalDocuments = $ additionalIndexer -> getAdditionalItemDocuments ( $ item , $ language , $ itemDocument ) ; if ( is_array ( $ additionalDocuments ) ) { $ documents = array_merge ( $ documents , $ additionalDocuments ) ; } } else { throw new \ UnexpectedValueException ( get_class ( $ additionalIndexer ) . ' must implement interface ' . AdditionalIndexQueueItemIndexer :: class , 1326284551 ) ; } } } return $ documents ; }
Allows third party extensions to provide additional documents which
should be indexed for the current item.

@param Item $item The item currently being indexed.
@param int $language The language uid currently being indexed.
@param Document $itemDocument The document representing the item for the given language.
@return Document[] array An array of additional Document objects to index.
Allows third party extensions to provide additional documents which should be indexed for the current item .