protected function resolveFieldValue($solrFieldName, Document $pageDocument)
    {
        $pageRecord = $GLOBALS['TSFE']->page;

        $pageIndexingConfiguration = $this->configuration->getIndexQueueFieldsConfigurationByConfigurationName($this->pageIndexingConfigurationName);

        if (isset($pageIndexingConfiguration[$solrFieldName . '.'])) {
            $pageRecord = AbstractIndexer::addVirtualContentFieldToRecord($pageDocument, $pageRecord);

            // configuration found => need to resolve a cObj
            $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
            $contentObject->start($pageRecord, 'pages');

            $fieldValue = $contentObject->cObjGetSingle(
                $pageIndexingConfiguration[$solrFieldName],
                $pageIndexingConfiguration[$solrFieldName . '.']
            );

            if (AbstractIndexer::isSerializedValue($pageIndexingConfiguration, $solrFieldName)) {
                $fieldValue = unserialize($fieldValue);
            }
        } else {
            $fieldValue = $pageRecord[$pageIndexingConfiguration[$solrFieldName]];
        }

        return $fieldValue;
    }
protected function resolveFieldValue($solrFieldName, Document $pageDocument)
    {
        $pageRecord = $GLOBALS['TSFE']->page;

        $pageIndexingConfiguration = $this->configuration->getIndexQueueFieldsConfigurationByConfigurationName($this->pageIndexingConfigurationName);

        if (isset($pageIndexingConfiguration[$solrFieldName . '.'])) {
            $pageRecord = AbstractIndexer::addVirtualContentFieldToRecord($pageDocument, $pageRecord);

            // configuration found => need to resolve a cObj
            $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
            $contentObject->start($pageRecord, 'pages');

            $fieldValue = $contentObject->cObjGetSingle(
                $pageIndexingConfiguration[$solrFieldName],
                $pageIndexingConfiguration[$solrFieldName . '.']
            );

            if (AbstractIndexer::isSerializedValue($pageIndexingConfiguration, $solrFieldName)) {
                $fieldValue = unserialize($fieldValue);
            }
        } else {
            $fieldValue = $pageRecord[$pageIndexingConfiguration[$solrFieldName]];
        }

        return $fieldValue;
    }
protected function resolveFieldValue ( $ solrFieldName , Document $ pageDocument ) { $ pageRecord = $ GLOBALS [ 'TSFE' ] -> page ; $ pageIndexingConfiguration = $ this -> configuration -> getIndexQueueFieldsConfigurationByConfigurationName ( $ this -> pageIndexingConfigurationName ) ; if ( isset ( $ pageIndexingConfiguration [ $ solrFieldName . '.' ] ) ) { $ pageRecord = AbstractIndexer :: addVirtualContentFieldToRecord ( $ pageDocument , $ pageRecord ) ; // configuration found => need to resolve a cObj $ contentObject = GeneralUtility :: makeInstance ( ContentObjectRenderer :: class ) ; $ contentObject -> start ( $ pageRecord , 'pages' ) ; $ fieldValue = $ contentObject -> cObjGetSingle ( $ pageIndexingConfiguration [ $ solrFieldName ] , $ pageIndexingConfiguration [ $ solrFieldName . '.' ] ) ; if ( AbstractIndexer :: isSerializedValue ( $ pageIndexingConfiguration , $ solrFieldName ) ) { $ fieldValue = unserialize ( $ fieldValue ) ; } } else { $ fieldValue = $ pageRecord [ $ pageIndexingConfiguration [ $ solrFieldName ] ] ; } return $ fieldValue ; }
Resolves a field mapping to its value depending on its configuration.

Allows to put the page record through cObj processing if wanted / needed.
Otherwise the plain page record field value is used.

@param string $solrFieldName The Solr field name to resolve the value from the item's record
@return string The resolved string value to be indexed
Resolves a field mapping to its value depending on its configuration .