public function cObjGetSingleExt(
        /** @noinspection PhpUnusedParameterInspection */ $name,
        array $configuration,
        /** @noinspection PhpUnusedParameterInspection */ $TyposcriptKey,
        $parentContentObject
    ) {
        $this->configuration = array_merge($this->configuration, $configuration);

        $relatedItems = $this->getRelatedItems($parentContentObject);

        if (!empty($this->configuration['removeDuplicateValues'])) {
            $relatedItems = array_unique($relatedItems);
        }

        if (empty($configuration['multiValue'])) {
            // single value, need to concatenate related items
            $singleValueGlue = !empty($configuration['singleValueGlue']) ? trim($configuration['singleValueGlue'], '|') : ', ';
            $result = implode($singleValueGlue, $relatedItems);
        } else {
            // multi value, need to serialize as content objects must return strings
            $result = serialize($relatedItems);
        }

        return $result;
    }
public function cObjGetSingleExt(
        /** @noinspection PhpUnusedParameterInspection */ $name,
        array $configuration,
        /** @noinspection PhpUnusedParameterInspection */ $TyposcriptKey,
        $parentContentObject
    ) {
        $this->configuration = array_merge($this->configuration, $configuration);

        $relatedItems = $this->getRelatedItems($parentContentObject);

        if (!empty($this->configuration['removeDuplicateValues'])) {
            $relatedItems = array_unique($relatedItems);
        }

        if (empty($configuration['multiValue'])) {
            // single value, need to concatenate related items
            $singleValueGlue = !empty($configuration['singleValueGlue']) ? trim($configuration['singleValueGlue'], '|') : ', ';
            $result = implode($singleValueGlue, $relatedItems);
        } else {
            // multi value, need to serialize as content objects must return strings
            $result = serialize($relatedItems);
        }

        return $result;
    }
public function cObjGetSingleExt ( /** @noinspection PhpUnusedParameterInspection */ $ name , array $ configuration , /** @noinspection PhpUnusedParameterInspection */ $ TyposcriptKey , $ parentContentObject ) { $ this -> configuration = array_merge ( $ this -> configuration , $ configuration ) ; $ relatedItems = $ this -> getRelatedItems ( $ parentContentObject ) ; if ( ! empty ( $ this -> configuration [ 'removeDuplicateValues' ] ) ) { $ relatedItems = array_unique ( $ relatedItems ) ; } if ( empty ( $ configuration [ 'multiValue' ] ) ) { // single value, need to concatenate related items $ singleValueGlue = ! empty ( $ configuration [ 'singleValueGlue' ] ) ? trim ( $ configuration [ 'singleValueGlue' ] , '|' ) : ', ' ; $ result = implode ( $ singleValueGlue , $ relatedItems ) ; } else { // multi value, need to serialize as content objects must return strings $ result = serialize ( $ relatedItems ) ; } return $ result ; }
Executes the SOLR_RELATION content object.

Resolves relations between records. Currently supported relations are
TYPO3-style m:n relations.
May resolve single value and multi value relations.

@param string $name content object name 'SOLR_RELATION'
@param array $configuration for the content object
@param string $TyposcriptKey not used
@param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $parentContentObject parent content object
@return string serialized array representation of the given list
Executes the SOLR_RELATION content object .